Markup Language Text Highlighting for Non-Orthogonal Angles
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional text highlighting methods in markup language documents, such as HTML, are unable to accurately highlight text oriented at angles other than 0 degrees or 90 degrees, particularly when text is embedded in images, leading to reduced functionality and user experience in applications like the oil and gas industry that require arbitrary text orientations.
Innovation Solution
A method that involves obtaining location data for text elements oriented at non-orthogonal angles, rotating and translating a canvas element to align with the text element's orientation, and generating a highlighting element that overlays the text, allowing for accurate highlighting of text at any arbitrary orientation within an image in a markup language document.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If conventional text highlighting methods are used in markup language documents, then the implementation is simple and straightforward, but the method cannot accurately highlight text oriented at angles other than 0 degrees or 90 degrees
Solution Approach 1:
The patent applies preliminary action by pre-calculating and storing transformation matrices that map arbitrary text orientations to standard horizontal/vertical highlighting orientations. Before performing the highlighting operation, the system transforms the text element's bounding box coordinates using pre-computed rotation matrices, thereby preparing the data in advance to enable conventional highlighting algorithms to work on arbitrarily oriented text without requiring complex real-time computation during the highlighting process itself.
Solution Approach 2:
The patent introduces an intermediary transformation layer between the arbitrary text orientation and the standard highlighting system. This intermediary consists of coordinate transformation matrices and orientation adjustment mechanisms that act as a bridge, converting text elements at any angle into an intermediate representation that can be processed by conventional highlighting algorithms, thus resolving the contradiction between supporting arbitrary orientations and maintaining implementation simplicity.
2Adaptability or versatility
If text highlighting is limited to horizontal and vertical orientations only, then the highlighting operation remains straightforward and accurate, but the application functionality is reduced for texts at arbitrary angles
Solution Approach 1:
The patent applies parameter changes by modifying the coordinate system parameters (rotation angle and translation offset) of the text element's bounding box to align arbitrary orientations with the standard highlighting coordinate system. The system calculates new bounding box parameters through rotation transformations, effectively changing the spatial parameters of the text element so that conventional horizontal/vertical highlighting algorithms can accurately target the text regardless of its original orientation angle.
Solution Approach 2:
The patent extends the highlighting capability from a two-dimensional horizontal/vertical constraint to a multi-dimensional orientation space by introducing rotation angle as an additional parameter. The system handles text elements in three-dimensional orientation space by computing rotation matrices that map any angle to the standard coordinate system, thereby adding dimensional flexibility to the highlighting operation while maintaining accuracy through precise coordinate transformation.
3Measurement precision
If the canvas context is rotated and translated to align with text orientation, then accurate highlighting is achieved, but additional processing steps are required
Solution Approach 1:
The patent applies copying by creating a visual copy of the text element's bounding box at the transformed coordinates and rotation angle. Instead of permanently modifying the canvas context, the system draws a temporary highlighted copy of the text region at the rotated and translated position, then restores the original context state. This copying approach achieves accurate visual highlighting of arbitrarily oriented text while avoiding the complexity of permanent canvas transformation and preserving the original document layout.
Solution Approach 2:
The patent introduces dynamic canvas manipulation by making the canvas context transformation reversible and stateful. The system dynamically adjusts the canvas translation and rotation parameters based on the text element's orientation, performs the highlighting operation, and then restores the original context state. This dynamic approach enables accurate highlighting of text at any angle while maintaining flexibility and avoiding permanent modification of the canvas, thereby managing complexity through controlled, reversible transformations.
Data Source
AI summary
A computer-implemented method and apparatus for highlighting text in an image disposed in a markup language document are disclosed. Location data identifying a location, size and orientation of a text element in the image may be obtained, where the text element is oriented in a direction that is non-orthogonal to vertical and horizontal axes of the image. A context for a canvas element in the document may be obtained and rotated to align the context to the orientation of the text element using the location data. The context may also be translated to the location of the text element using the location data, and a text highlighting element that at least partially overlays the text element may be generated.


