AU2007202158A1 - Simplifying complex gradients - Google Patents

Simplifying complex gradients Download PDF

Info

Publication number
AU2007202158A1
AU2007202158A1 AU2007202158A AU2007202158A AU2007202158A1 AU 2007202158 A1 AU2007202158 A1 AU 2007202158A1 AU 2007202158 A AU2007202158 A AU 2007202158A AU 2007202158 A AU2007202158 A AU 2007202158A AU 2007202158 A1 AU2007202158 A1 AU 2007202158A1
Authority
AU
Australia
Prior art keywords
fill
gradient
complex
point
rendering
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
AU2007202158A
Inventor
Paul Frederick Birchall
Ben Carr
David Karlov
Giles Puckett
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to AU2007202158A priority Critical patent/AU2007202158A1/en
Publication of AU2007202158A1 publication Critical patent/AU2007202158A1/en
Abandoned legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour

Description

14. MAY. 2007 16:54 SPRUSON FERGUSON 92615486 NO. 4785 P. 5/44 S&F Ref: 808245 0
AUSTRALIA
PATENTS ACT 1990 COMPLETE SPECIFICATION FOR A STANDARD PATENT Name and Address of Applicant: Actual Inventor(s): Address for Service: Invention Title: Canon Kabushiki Kaisha, of 30-2, Shimomarnko 3-chome, Ohta-ku, Tokyo, 146, Japan David Karlov, Paul Frederick Birchall, Giles Puckett, Ben Carr Spruson Ferguson St Martins Tower Level 31 Market Street Sydney NSW 2000 (CCN 3710000177) Simplifying complex gradients The following statement is a full description of this invention, including the best method of performing it known to me/us:- 584c(789058_1) COMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14JAY.2007 16:54 14. MA. 2%?16:54 SPRUSON FERGUSON 92615486 N.48 .64 NO-4785 P. 6/44 S SIMPLIFYING COMPLEX GRADIENTS Technical Field The present invention relates to graphic object rendering and, in particular, to processing a complex gradient-fillod object into a simpler form, so as to be representable in 00 a display list which does not natively support toe complex gradient fill type.
Background Ci in recent years, graphics packages have existed for rendering printable pages to ooutput devices such as printers, display screens, and/or other locations (eg. files). A number of these graphics packages typically utilise a high-level page description language for assisting in the layout of the printable pages. These graphics packages typically comprise a rendering system, which converts the high level page description of the page layout into pixel data that can be used as raster data to be printed and/or displayed.
Computer generated images arc typically made up of many different components or graphical elements which are rendered and composited together to create a final output image. The rendering and compositing may be performed by special-purpose hardware, or by software running on a general or special-purpose computer system, such as a microprocessor inside a printer. For each graphical element, a software application sends a drawing command to a graphics device interface layer. Each drawing command is typically referred to as a graphiical object. A printer driver then generates a final description of the page to be printed, this including a description of each graphical object. This final description is called a display list. The display list is then spooled to the target printer engine. A display list consists of a set of rendering instructions. "Display list" and "set of rendering instructions" are used interchangeably throughout this disclosure.
a0a245sped 7878771.1300 COMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14-MAY-2007 16:54 14. AY. G67 6:54SPRUSON FERGUSON 92615486 N.48 .74 NO-4785 P. 7/44 Sometimes, such as in a print-on-demand scenario, a display list can be created prior to knowing the particular printer device upon which the display list will be rendered.
The colour space of the display list is to be rendered is therefore unknown at the time the display list is created.
00 5 Display list formats are typically restrictive in the types of graphical objects they c-i support, in order to keep the complexity of rendering hardware low, and therefore reduce the cost of such hardware. Some complex object types must therefore be simplified before o the objects can be included in a display list. One such complex object type is a complex gradient-filled object, or complex gradient object.
One class of complex gradient object is an object filled by a multi-stop gradient which has three or more stops, which is now described with reference to the example of Fig. A multi-stop gradient can have two stops, but such a gradient is not considered a complex gradient, because it is equivalent to a two-point gradient. A multi-stop gradient is defined by two end stops 851 aad 855, between which lies the gradient line 861, and a number of stops 852, 853, and 854 on the gradient line 861. The gradient stops each have a linear positional value, which indicates the location of the stop on a straight line between the two end points. The positional values of stops 851, 852, 853, 854, and 855 are 0.00, 0.2S, 0.5, 0.75, and 1.00 respectively. The gradient stops each have a colour value, which indicates the colour at that point. Colours of points on the gradient line 861 wbicb are not coincident with stops are determnined by linearly interpolating the colour values between the two adjacent stops. The colour of point P 871 is the average of the colours of points 853 and 854, because P is halfway between those points. Colours of points not on the gradient line 861 are defined by the rule that any line which is normal to the gradient line has a constant colour. The colour of point Q 872 is the same as P 871, because they 808245.p.pedi 787877 _1.DOC SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14.MAY.2007 16:55 14. AY. 0Q7 6:55SPRUSON FERGUSON 92615486 N.48 .84 NO-4785 P. 8/44 0 both lie on the same normal 873 to the gradient line 861. Colours of points beyond the start or end of the gradient line such as R 874 or 875 are undefined, unless extend modes are defined. Extend modes are described later in the discl osure.
A second class of complex gradient object is an object filled by a collinear three- 00 5 point gradient, which will now be described with reference to Fig. A three-point ci gradient defines a fill by specifying three points 881, 882, and 883, each of which is associated with a colour. EB colour channel is interpolated linearly over the area of the o gradient such that the resulting colour at each of the three points matches the colours associated with them. For example, if the colour of 881 is Red, wit (normalised) KGB values of 0.0, the colour of 882 is Black 0, 0. 0, and the colour of 883 is Blue 0.0, then the colour of point S 884 will be Purple 0.0, A threepoint gradient in which the three points are collinear is undefined according to this conventional calculation method, however it is still important to produce results that are expected and visually pleasing.
A third class of complex gradient object is an object filled by a two-point gradient having an exend mode. A two point gradient will now be described with reference to Fig. A two point gradient defines a fil by specifying two points 891 and 892, between which lies the gradient line 893, each point being associated wit a colour. The colour of a point on the gradient line 893 is determined by interpolating linearly between the colours of the end points. The colour of point T 894 is the average of the colours of points 891 and 892, because T is halfway between those points. Colours of points not on the gradient line 893 are defined by the rule that any line which is normal to the gradient line has a constant colour. The colour of point U 896 is the same as T 894, because they both lie on the same normal 895 to the gradient line 893. Colours of points beyond the 808245_.spedi 787877_.000 COMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14-MAY-2007 16:55 14. AY. 067 6:55SPRUSON FERGUSON 92615486 N.48 .94 NO-4785 P. 9/44 -4- 0 start or end of the gradient line such as V 897 or W 898 are undefined, unless extend modes are defined. Extend modes are described later in the disclosure and make a twopoint gradient fill complex by defining the operation of the fill beyond the two stop points.
Various methods have been developed in order to represent complex gadienits in a 00 5 display list which does not support them natively. One such method wbich particularly applies to mali-stop gradients is to convert the gradient into a large set of thin rectangles, Cl each rectangle having a constant colour (a "flat fill"'), and add these rectangles to the o display list. This method is unsatisfactory on a high-quality raster image processor (RIP) system, because of the banding artifacts which this method causes. In addition, if the reader colour space of the display list is unknown at the time the display list is created, then any non-linearity between the originally assumed render colour space and the actual render colour space will cause errors in the colour of the rendered result.
Another known method for handling multi-stop gradients is to performi a pre-render step on the gradient, to produce a bitmap image which can be added to the display list. The bitmap can be one pixel high (or wide, depending on the direction of the gradient), with a transfornation which stretches it to the required dimensions. This method also has the drawback of errors in the colour reproduction, if the render colour space is unknown at the time the display list is created- Another drawback of this method is that when the display list is constructed for a large-format printer, the bitmap can be large, and can therefore consume excessive resources, despite being only one pixel high.
A third method is only used for a collinear three-point gradient. This method involves ignoring the middle point of the three, and treating the two outer points as a twopoint gradient. This approach fails to produce an "expected" result when the colour of the middle point is substantially different to the colours of the two outer points.
a08A4-spel 787877_tDOC COMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14-MAY-2007 16:55 14~ AY. 007 6:55SPRUSON FERGUSON 92615486NO475 P 1/4 NO-4785 P. 10/44 summary It is an object of the present invention to substantially overcome or at least ameliorate one or more deficiencies of known arranAgements. A desirable solution is to provide a method and system capable of representing a complex gradient in a display list 00 5 which does not support the complex gradient natively, and which avoids or mitigates the (N conventional drawbacks of banding artifacts in the output, errors in colour reproduction, and excessive memory usage, described above.
o In accordance with the present disclosure, there is provided a method of rendering a graphical object having a complex gradient fill defined by a plurality of points. The method firstly identifies a boundary associated with the complex gradient fill, The complex gradient fill is then processed by identifying a region defined using at least one point of the complex gradient fill and the boundary, (ii) creating a simple fill corresponding to the region, and (iii) repeating the steps and (ii) until a simple fill has been created for all the regions intersecting the boundary and for which the complex gradient fill is defined, at least one of the simple fills being a two-point gradient fill. The method then renders the simple fills within the corresponding regions to form an output image.
At least one of the simple fills may be a flat fill. Further the complex gradient fill may a multi-stop gradient with at least three stops, or a collinear three-point gradient. In a far-ther alternative, the complex gradient fill may be one of a two-point gradient with an extend mode and a multi-stop gradient with an extend mode.
Preferably, the boundary comprises an outline of said graphical object or a bounding box enclosing said graphical object. In this later example, the bounding box has edges aligned with axes of a drawing coordinate system in which the graphical object is to 8082453spec1 787877_1.000 COMS ID No: SBMI-07365811 Received by IP Australia: Time (I-tm) 17:10 Date 2007-05-14 14, MAY, 2007 16:56 SPRUSON FERGUSON 92615486 NO. 4785 P, 11/44 -6- 0 0'q be rendered. Alternatively, the bounding box has edges alig ed with respect to a Ccoordinate system of the, complex gradient fill Desirably, each said simple fill has an associated clip corresponding to the outline of said region, and said rendering step renders each said simple fill within the associated 00 5 clip.
c,1 In a specific implementation, each region may be defined by choosing two 0 consecutive stop points of the complex gradient fill, drawing lines at said points which are onormal to the direction of the gradient fill, and extending said lines until they meet the boundary.
Also, each simple fill may have an associated object whose outline is the intersection of the region and the outline of the graphical object.
The rendering can comprise incorporating instructions regarding the simple fills and the associated clips into a display list, the display list including rendering instnuctions for an image including the graphical object, and rendering the display list. The instructions regarding the simple fills may be formed as a processed list including the clips associated with each of the simple fills, the method comprising the further steps of retrieving a first entry from said processed list, adding the contents of said entry to the display list by (ba) retrieving a clip and a simple fill from said entry;(bb) adding said clip to a current object clip of said display list; (bc) adding said simple fill to the display list with the current object outline, and the current object clip; and (bd) removing said clip from the current object clip; and repeating step until all entries in said processed list have been added to the display list, Desirably the graphical object includes a plurality of said complex gradient fills, and each complex gradient fill is processed into a corresponding one of the processed lists, 808245_speci 787877.1.DOC COMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14-MAY-2007 16:56 14. MA. flU16:56SPRUSON FERGUSON 92615486NO475 P 124 NO-4785 P. 12/44 7 (Nand the lbrther steps are performed upon each processed list to add the corresponding Ct simple fills and clips to the display list.
Other aspects of the disclosure are provided including a computer prozram and computer apparatus for implementing the method.
005 Brief Description of the Drawings CA At least one embodiment of the present invention will now be described with 1 reference to the following drawings, in which: o Fig. 1 is a flowchart of a method for processing a complex gradient object to produce simple gradient objects that can be represented in a display list; Figs. and 2(c) show a complex gradient being partitioned into simple gradients using the method of Fig. 1, where the bounding box used is upright in the drawing coordinate system; Figs. and 3(c) show a complex gradient being partitioned into simple gradients using the method of Fig. 1, where the bounding box used is upright wit respect to the direction of the gradient; Fig. 4 is a flowchart of a method for adding a list of fills and associated clips as produced by the method of Fig. 1 to a display list for rendering; Fig. 5 is a flowchart of a method for adding two lists of fills and associated clips as produced by the method of Fig. 1 to a display list for rendering; Fig. 6 is a schematic block diagram of a render pipeline in which the gradient simplification methods of the present disclosure may be implemented; Fig. 7 is a schematic block diagram representation of a computer system incorporating a rendering arrangement; Figs. 8(a) to 8(c) illustrate known different classes of complex gradients; BO24Ojapeci 787877) .DO0C COMS ID No: SBMI-0736581 1 Received by IP Australia: lime 17:10 Date 2007-05-14 14-MAY-2007 16:56 14.MAY 200116:56SPRUSON FERGUSON 92615486NO475 p 134 NO. 4785 P. 13/44 Figs. 9(a) to 9(d) show a complex gradient with extend modes being partitioned into simple gradients using the method of Fig. 1; Figs. 10(a) to 10(c) illustrate the processing of an object by method of Fig. 5, where the object has more than one operand which is a complex gradient; and 00 F 1igs. 11 to 11(e) illustrate various extend modes.
Detailed Description including Best Mode Rendering Apparatus 0 Fig. 7 illustrates schematically a system 700 for processing computer graphic images, The system includes a host processor 702 associated with system random access memory (RAM) 703, which may include a non-volatile hard disk drive or similar device 705 and volatile, semiconductor RAM 704. The system 700 also includes a system read-only memory (R.OM) 706 typically founded upon semiconductor ROM 707 and which in many cases may be supplemented by compact disk devices (CD ROM) 708. The system 700 may also incorporate a target device 611 for displaying images, such as a printer or video display unit (VDU) which operates in raster fashion.
The above-described components of the system 700 are interconnected via a bus system 709 and are operable in a normal operating mode of computer systems well known in the art, such as IBM PC/AT type personal computers and arrangements evolved therefrom.
Also seen in Fig. 7, a graphic rendering system 603 (or renderer) connects to the bus 709, and is configured for the rendering of pixel-based images derived from graphic object-based descriptions supplied with instructions and data from the processor 702 via the bus 709. The renderer 603 may utilise the system RAM 703 for the rendering of object 808245-speoi 785771-00C COMS ID No: SBMI-07365811 Received by IP Australia: lime 17:10 Date 2007-05-14 14-MAY-200) 16:57 14. MA. 2%?16:5?SPRUSON FERGUSON 92615486NO475 P 1/4 NO-4735 P. 14/44 9 descriptions. Preferably, the renderer 603 has associated therewith a dedicated rendering store arrangement 630, typically formed of semiconductor RAM- The rendering system 603 may be implemented as software on the host processor 702, or it may be an embedded system on the target device 611, or it may be a 00 5 separate self-contained hardware module, N The rendering pipeline 600 is illustrated in Fig. 6. A graphics data source 601, such as a PIDh (page description language) interpreter or ODI (graphics device interface) driver, o running on the host processor 702, sends graphics data to the graphics rendering system 603, which has a display list generation module 605 and a rendering module 609.
The display list generation module 605 includes code which receives complex gradient objects, simplifies them, and adds the simplified objects to the display list 607.
The display list 607 is then passed to a rendering module 609 which interprets instructions in the list 607 to render pixel data that is forwarded to a target device 611, such as a display or printer engine, for reproduction of the pixel data as pixels. The rendering of the pixel data may involve numerous tasks including the filling of outlines of graphical objects with colour as well as the compositing of overlying objects with each other.
Simplifying complex gradients When the display list generation module 605 receives a complex gradient object, the object is processed by the display list generation module 605 using a method 100, represented by the flowchart of Fig. 1. The method 100 operates to simplify the complex gradient fill into a number of simple fills which can be processed as part of a standard display list. Examples of simple fills include a flat fill and a two-point gradient fill. The method 100 will now be described with reference to the example of Figs. 2(b), and 2(c).
808245 speol 787877_1.DOC COMS ID No: SBMI-07365811 Received by IP Australia: lime 17:10 Date 2007-05-14 14. MAY, 2007 16:57 SPRUSON FERGUSON 92615436 N0.4785 P. 15/44 FIg. 2(a) represents the complex gradient 200, which fills an outline 216. The complex gradient 200 in this example is a multi-stop gradient, with five stop points 211, 212, 213, 214, and 215, All stop points are coUlinear. A colour is associated with each stop point.
00 5 In a first step 151 of the method 100, an empty list of (simple) fills and associated Oc clips, L, is initialised, In stop 153, a boundary for the complex gradient object namely the bounding obox 219 enclosing the complex gradient object, is identified. The bounding box 219 need not be minimal, although excessively large clips will be generated if the bounding box 219 is not minimal. The bounding box 219 encloses the outline 216 of the graphical object, which can be arbitrarily complex. The bounding box 219 is upright (has edges aligned) with respect to the drawing coordinate system in which the graphical object is to be rendered. Typically, a bounding box is supplied with each object received by the display list generation module 605.
A flat fill is an example of a simple fill for which all pixels in the flat fill are the same colour, Step 155 tests whether any non-simplified region in the complex gradient 200 can be represented by a flat fill. Initially, all regions of the complex gradient are non-simplified. In Fig. if points 211 and 212 have the same colour, then region 222, seen in Fig. can be represented by a flat fill. If a non-simplified region of the complex gradient 200 can be represented by a flat fill (the YES option of step 155), then the method 100 continues at step 157.
In step 157, a region R of the complex gradient 200 is identified which can be represented by a flat fill. If two consecutive points of the complex gradient are the same colour, then region R may be formed by choosing two consecutive stop points of the 808245_,speci 78777 _1.fOC COMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14-MAY-2007 16:57 14.MAY 200716:57 SPRUSON FERGUSON 92615486 N.75P 64 NO.47B5 P. 16/44 (N complex gradient 200 (called point A and point H3); drawing lines at points A and B which are normal to the direction of the gradient; and extending those lines until they meet the bounding box 219. The region enclosed by the normal lines and the bounding box can then be represented by a flat fill.
005 In step 159, a flat fill F is constructed for the current region R. The fill has the colour of stop point A 211, which is the same as the colour of point B 212. The method 100 then proceeds to step 167.
o In step 167, a clip C for the simple fin (either a fiat fill or a two-point gradient) is constructed as the outline of the current region R. An outline of the clip C contains between three and six segments, depending on the relationship between the complex gradient stop points 211-215 and the bounding box 219. All segments are either vertical or horizontal with respect to the drawing coordinate system, or are normal to the direction of the complex gradient. Clip 232 in the example of Fig. 2(c) has five segments denoted by segments 232a, 232b, 232c, 232d and 232e.
In step 169, the flat fill. F and the clip C are added to the list L, and in step 171 region R. is marked as simplified. The process 100 returns to step 155 to process another region.
If there arc more non-simplified regions in the complex gradient which can be represented by a flat fill (the YES option of step 155), the previously desertbed steps beginning at step 157 are repeated. Otherwise, (the NO option of step 155), the process 100 continues at step 161.
Step 161 tests whether any non-simplified region in the complex gradient 200 can be represented by a two-point gradient fill. If so (the YES option of step 161), then the process 100 continues at step 163.
808245 spec! 76877_1.DOC COMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14.MAY.2007 16:58 14.MAY 200116:58 SPRUSON FERGUSON 92615486 N.15P 14 NO.4785 P. 17/44 -12- In step 163, a new region R of the complex gradient 200 is identified which can be represented by a two-point gradient fill. In general, such a region may be formed by choosing two consecutive stop points of the complex gradient 200 (called point A and point B) which have different colours; drawing lines at points A and 13 which are normal to 00 the direction of the gradient; anid extending those lines until they meet the bounding box 219. The new (current) region R enclosed by the normal lines and the bounding box r- can be represented by a two-point gradient, In Pig. such a region 223 is enclosed by N the normals of the gradient direction at points 212 (point A) and 213 (point and the bounding box 219.
In step 165, a two-point gradient fill F 237 is constructed for the current region R (223). The first point of the two-point gradient fill F has the same geometrical coordinates and colour as point A 212. The second point of the two-point gradient fill F has the same geometrical coordinates and colour as point B 213. The method 100 then continues in step 167 wherein a further clip C 233 is created; step 169 wherein the fill P and the clip C are added to the list L; and step 171 wherein region R 233 is marked as simplified, before returning to step 155.
If there are no non-simplified regions in the complex gradient which can be represented by a two-point gradient fill (the NO option of step 161), then the method 100 terminates at step 199. At this stage, for the example of Figs. 2(a) regions 222, 223, 224, and 225 have been processed, and te resulting clips 232, 233, 234, and 235 and their associated flat fills or two-point gradient fills have been added to list L. Regions 221 and 226 are ignored since, although within the bounding box 219, the complex gradient 200 is not defined within regions 221 and 226, since complex gradient 200 has no extend mode.
80825...pevi787677_.000 COMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14-MAY-2007 16:58 14. MA. 16:58SPRUSON FERGUSON 92615486NO475 P 184 NO-4785 P. 18/44 -13 (N The order in which regions of the complex gradient are processed is unimportant.
The method 100 can also be applied to a collinear three-point gradient fill, where the three points of the three-point gradient are treated as a multi-stop gradient with three stops. The result of the method 100 is a processed list L having entries forming descriptions of 00 5 simplified fills which collectively represent the original complex gradient fill of the graphical object.
Adding processed gradients to the display list o The processed list of fills and clips L created by the method 100 is added to the display list in process 400 of Fig. 4. The process 400 commences with step 451, where the first entry or node, N, is retrieved from the list L. Step 453 then tests whether node N is valid, essentially indicating that the list L has an entry, and that a pointer to the list is not a null-pointer. The first time step 453 occurs, the node N will be valid unless the list L is empty. If node X4 is valid (the YES option of step 453), the process 400 continues at step 455.
Tn step 455, the fill F and its associated clip C are retrieved from the node N. In step 457, the clip C is added to the current object clip. The current object clip is a term traditionally used in display list consttniction to describe the clipping operation which will be applied to a current object when the object is rendered. In the present implementation, the cm-rent object clip will be the clip that is associated with the complex gradient object from which the list L was created, plus any clip associated with the higher level drawing state which must be applied to all objects. The current object clip may be empty.
In step 459, the fill F is added to the display list. The fill F is added using the original outline (for example, the outline 216) provided with the complex gradient object, and the current obj ect clip, which includes the clip C.
808245 6pec 787877j-1DOC COMSID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14-MAY-2007 16:5B 14. AY. U07 6:58SPRUSON FERGUSON 92615486NO475 P 194 NO-4785 P. 19/44 -14- In step 461, clip C is removed from the current object clip, to restore the current object clip to the state the current object clip held prior to step 457.
In step 463, node N is iterated to become the next node in list L, and the process 400 continues at step 453 until node N is invalid, indicating that all nodes in list L 00 have been processed. Jh this cae (the NO option of step 453), the process 400 tenninates o at step 499.
The order of entries/nodes in list L is unimportant. The resulting display list can 0 then be rendered using a standard renderer 609 that supports linear gradients and clips.
Alternative implementations Several alternative implementations will now be described, Each alternative is described as a variation of the implementation described above, and may be exercised in parallel with any other alternative, or exercised alone.
In a first alternative implementation, a new bounding box is computed which is upright has edges aligned) with respect to a gradient coordinate system defined by the axes of the gradient fill, and which contains the original object bounding box that was upright with respect to the drawing coordinate system. This is illustrated in Figs. 3(a), and 3(c) with respect to the example gradient fill seen in discussed above.
The original bounding box 311 is expanded to a bounding box 312 which is upright with respect to the gradient coordinate system, In this example, the gradient coordinate system differs to the drawing coordinate system by only a rotation, but the method may be used for any gradient coordinate system which can be reached via an affine transformation (such as a translation, rotation, scaling, or skew) from toe drawing coordinate system.
The method 100 is now applied to the complex gradient object as described previously, with the exception that the new bounding box 312 is used. The regions of the 80824_ppea 767877_1.DOC COMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14, MAY, 2007 16:59 SPRUSON FERGUSON 92615486 N0,4785 P, 20/44 0 0 complex gradient 320 which can be represented by flat fills or two-point gradient fills are Ct shown in Fig. and the resulting two-point gradients and their clips 330 are shown in 4Fig. In this alternative implementation, all edges of clip outlines 330 are aligned with respect to the axes of the gradient coordinate system (i.e the direction of the gradient and 00 its normals). All clip shapes therefore have exactly four segments, instead of between three and six segments as seen in Figs. 2(b) and (Note that Figs. 2(b) and 2(c) do not illustrate a region with six segments, but six is the theoretical maximum number of 0segments a region can have).
In a second alternative implementation, a complex gradient is a two-point gradient with an extend mode, or multi-stop gradient with an extend mode. An extend mode is one of "pad", "repeat", "reflect", and "extrapolate". The extend mode defines how the gradient operates in the regions beyond the end-points of the gradient. Extend modes can be used to achieve certain visual effects whilst describing the complex gradient using a relatively compact representation, albeit not one conducive to rendering within a traditional display list. Fig. 11(a) illustrates an example of a two-point gradient fill with no extend mode, whereby regions beyond the points are undefined. Fig. 11(b) shows the same two-point gradient with pad", in which the extensions comprise the terminal point colour. Fig. 11(c) shows the same two-point gradient with a "reflect" mode, where the extensions reflect the colours in the region between the points. Fig. 11(d) shows the gradient fill with "repeat", thereby repeating the same gradient. Fig. 11(e) shows the same gradient with "extrapolate", whereby the extensions extrapolate the colours from the fill defined between the points.
808245_pei 787877_1.DOC COMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14-MAY-2007 16:59 14. MA. 16:59SPRUSON FERGUSON 92615486NO475 P 214 NO-4785 P. 21/44 -16- (N The application of the method 100 to a gradient with different extend modes is now described with reference to Figs. and Fig. 9(a) shows a multi-stop gradient with three stops 912, 913, and 914, and with a bounding box 919.
An extend mode of "pad" pads the region in front of the first point with a flat 00 5 colour fill, of the same colour as the first point, and pads the region beyond the final point (N with a flat colour fill, of the same colour as the final point. If an extend mode of' 'padr" is applied to the example of Mig. then step 157 of the method 100 will identify o regions 922 and 925 as being representable by a flat 1i11.
An extend mode of "repeat" causes the gradient points to be repeated as many times as is necessary to fill the bounding box of the object. For example, repeating a three-point gradient can be used to achieve a striped "sawtooth" effect. If an extend mode of "repeat" is applied to the example of Figs. 9(c) and then step 163 of the method 100 will identify region 942 as being representable by a two-point gradient 971, because it is a repeat of the fill for region 944. As seen in Fig. when constructing the two-point gradient fill for region 942 in step 165, the relative position of the left point 973 of gradient 911 to the right point 975 is the same as the relative position of point 913 to 914.
Point 975 has the same coordinates as point 912. The colour of point 973 is the same as the colour of point 913, and the colour of point 975 is the same as the colour of point 914.
Step 163 of the method 100 will similarly identity regions 941, 945, and 946 as being representable by two-point gradients which are repeats of the fills for regions 943, 943, and 944, respectively.
An extend mode of "reflect" is similar to "repeat" but every second repetition has the order of the points reversed. If an extend mode of "repeat"is applied to the example of Figs. 9(c) and then step 163 of the method 100 will identify region 942 as being 808245.spedi 787877_1.Do0C COMS ID No: SBMI-07385811 Received by P1 Australia: Time 17:10 Date 2007-05-14 14.MAY.2007 16:59 14. AY. O~7 6:59SPRUSON FERGUSON 92615486NO475 .2/4 NO. 4785 P. 22/44 -17representable by a two-point gradient 971, because it is a reflection of the fill for region 943, thereby achieving another visual effect. When constructing the two-point gradient fill for region 942 in step 165, the relative position of the left point 973 of gradient 971 to the right point 975 is the same as the relative position of point 912 to 913.
00 kn 5 Point 975 has the same coordinates as point 912. The colour of point 973 is the same as the colour of point 913, and the colour of point 975 is the same as the colour of point 912.
Step 163 of process 100 will similarly identify regions 941, 945, and 946 as being 0 representable by two-point gradients which are reflections of the fills for regions 944, 944, and 943 respectively.
An extend mode of "extrapolate"' causes the region in front of. the first point to be filled using the same gradient as the region between the first point and the second point, and the region beyond the final point to be filled using the same gradient as the region between the final point and the penultimate point, If an extend mode of "extrapolate" is applied to the example of Fig. then step 163 of process 100 will identify region 942 as being representable by a two-point gradient fill, which is the same two-point gradient fill that represents region 943. Step 163 of' process 100 will also identify region 945 as being representable by a two-point gradient fill, which is the same two-point gradient fill that represents region 944.
In a third alternative implementation, the method 100 is applied to more than one operand within the same object. Au object can have more than one operand, each operand describing a different fill. Each operand fill is combined in some way according to the operator. With reference to the example of Figs. 10(a)-10(c), a first complex gradient fill I11 of Fig. 10(a) may, for example, be a rainbow-coloured fill applied to the outline 110 which is converted by the method 100 into list Li containing four simplified 808245-specd 787877J-1DOC COMS ID No: SBMI-07385811 Received by P1 Australia: Time 17:10 Date 2007-05-14 14-MAY-2007 17:00 14. AY. GG7 7:UUSPRUSON FERGUSON 92615486NO475 P 234 NO-4785 P. 23/44 -18- Cl regions 112, 113, 114, and 115. A second complex gradient fill 121 seen in Fig. Ct may, for example, be an alpha blend to be applied to the same outline 110, which is convented by the method 100 into list 12 containing two simplified regions 122 and 123.
When adding the fills and boundaries for simplified regions to the display list, 00 5 instead of using process 400, every combination of elements from list Li and list L2 is visited in turn. A process 500 will now be described in more detail with reference to Fig. 5, in which an object with two complex gradient operands, each of which have been o processed according to the method 100, is added to a display list. When an object has three or more complex gradient operands, the method of adding processed complex gradients to a display list may be implemented as an expansion of process 500, in the same way that process 500 is an expansion of process 400.
The process 500 commences with step 551, in which the first node, NI, is retrieved from list Li. Step 553 then tests whether node Ni is valid. If node Ni is valid (the YES option of step 553), the proces 500 continues at step 555. In step 555, fill Fi and its associated clip ClI are retrieved from node N1. In step 557, clip Cl1 is added to the current object clip.
In step 559, the first node, N2, is retrieved from list L2. Step 561 tests whether node N2 is valid. If node N2 is valid (the YES option of step 561), the process 500 continues at step 563. In step 563, fill F2 and its associated clip C2 are retrieved from node N2. In step 565, clip C2 is added to the current object clip.
In step 567, fills Fl and P2 are added to the display list. They are added using the original outline provided with the complex gradient object and the current object clip, which includes clips ClI and C2.
8O8245_.speci 78787t.1 .DOC COMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14-MAY-2001 17:00 14. MA. 17:UUSPRUSON FERGUSON 92615486NO475 P 2/4 NO-4785 P, 24/44 -19 in the next step 569, clip G2 is removed fromn the current object clip, to restore the current object clip to the state the current object clip held prior to step 565. In step 571, node N2 is iterated to become the next node in list L2, and the process continues at step 561 until node N2 is invalid, indicating that all nodes in list L2 have been processed.
00 In this case (the NO option of step 561), the process 500 continues at step 573.
In step 573, clip Cl is removed from the current object clip, to restore the current object clip to the state the current object clip held prior to step 557. In step 575, node NI is 0 iterated to become the next node in list Li, and the process continues at step 553 until node Ni is invalid, indicating that all nodes in list Li have been processed. In this case (the NO option of step 553), the process terminates at step 599.
The result of applying process 500 to the example of Figs. 10(a) and 10(b) is that shown in Fig. 10(c) where there are effectively eight regions 132-139 in the display list.
Region 132, the result of clipping with both the clip for region 112 and the clip for region 122, is filled using the fill for region 112 as the first operand, and the fill for region 122 as the second operand. Region 136, the result of clipping with both the clip for region 112 and the clip for region 123, is filled using the fill for region 112 as the first operand, and the fill for region 123 as the second operand. Likewise, regions 133, 134, 135, 137, 138, and 139 are each clipped by two clips, and use different combinations of simplified fills created by process 100 from the original complex fills 111 and 121.
In a fourth alternative implementation, the method 100 is followed, with the exception that the boundary of the complex gradient object identified in step 153 is the outline 216) of that object. Also, the list L is initialised in step 151 as a list of fills and outlines, rather than as a list of fills and clips. In step 167, instead of creating a clip, a new outline S is created which is the intersection of the original object outline, and the 8O24fijpeci 787877A .DOC GOMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14-MAY-2007 17:00 14. MA. flu17:OGSPRUSON FERGUSON 92615486NO475 P 2/4 NO-4785 P. 25/44 outline of R. In step 169, instead of adding the fill F and the clip C to the list L, the fill F and the outline S are added to the list L. The process 400 is followed to add the processed complex gradient to the display list with the exception that no new clips are added, and the outline S is used instead of the object outline. In particular, in step 455, the outline S and 00l 5 the fill F are retrieved from node N; step 457 is omitted; in step 459, the fill F is added to the display list with the outline S instead of the object outline; and step 461 is also omitted.
The fourth alternative implementation is useful when building a display list for a 0 renderer which does not support clips. However, the outline creation step 167 is slow, especially when the original object outline is complex.
In a further alternative implementation, rather than clipping to a bounding box aligned with the drawing coordinate system or the gradient coordinate system, clipping may be performed to the outline of the graphical object itself. This process would involve a more complex tracing of the outline to identify the clip.
The described methods, Whilst directly applicable to linear gradients and associated blends, may also be used to convert a multi-stop radial gradient into a plurality of two-stop radial gradients clipped by annular clips.
By resolving the complex gradient fill into a plurality of' simple fills, of which one is a two-point gradient fill, permits convenient processing and an ability to render with a traditional renderer that can operate upon a traditional display list.
Desirably, so as to permit wide application, the method 100 and the processes 400 and 500 are implemented using software executable upon a processor formning part of the display list generation module 605. The software may be formed by one or more application programs executable within the system 700 of M~g. 7. Ina particular, the steps of simplifying the complex gradients are effected by instructions in the software that are 808245_apedi 787877_1 .DOC COMS ID No: SBMI-07365811 Received by IP Australia: Time (I-tm) 17:10 Date 2007-05-14 14. MAY.2007 17:01 SPRUSON FERGUSON 92615486 NO. 4785 P. 26/44 -21- Cl carried out within the System 700. The instructions may be Conned as one or more code Ct modules, each for performing one or miore particular tasks. The software may also be divided into two separate parts, in which a first pat and the corresponding code modules performs the gradient simplification methods and a second part and the corresponding code 00 5 modules manage a user interface between the first part and the user. The software may be Cl stored in a computer readable medium, including the storage devices described above, for example. TIhe software is loaded into the system 700 from the computer readable medium, o and then executed by the system 700. A computer readable medium having such software or computer program recorded on it is a computer program product. The use of the computer program product in the system 700 preferably effeicts an advantageous apparatus for simplifying complex gradieuts.
In some implementations, some parts of the method 100 or processes 400 and 500 may be implemented in hardware to achieve accelerated operation, particularly where the rendering system 603 is dedicated and separate from the host processor 702.
Industrial Applicability The arrangements described are applicable to the computer and data processing industries and particularly for the generation of complex gradient fills for reproduction upon a display device and/cr using a printer.
The foregoing describes only some embodiments of the present invention, and modifications and/or changes can be made thereto without departing from the scope and spirit of the invention, the embodiments being illustrative and not restrictive.
(Australia Only) In the context of this specification, the word "comprising" means "including principally but not necessarily solely" or "having" or "including", and not 808E24apeci 787877.1 DOC COMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14.MAY,200) 17:01 SPRUSON FERGUSON 92615486 NO-.4785 P, 27/44 0 0 cN -22- "consisting only of". Variations of the word "comprising", such as "comprise" and "comprises" have correspondingly varied meanings.
808245_specl 787877_.DOC COMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14

Claims (9)

1. A method of rendering a graphical object having a complex gradient 611 defined by a plurality of points, the method comprising the steps of: 00 identifying a boundary associated with the complex gradient fill; processing the complex gradient fill by: identifying a region defined using at least one point of the complex 0 o gradient fill and the boundary; ci (ii) creating a simple fill corresponding to the region; and (iii) repeating the steps and (ii) until a simple fill has been created fbr all said regions intersecting the boundary and for which the complex gradient fill is defined, at least one of said simple fills being a two-point gradient fill; and rendering said simple fills within said corresponding regions to form an output image.
2. The method of claim 1, wherein at least one said simple fill is a flat fill.
3. The method of claim 1 or 2 where said complex gradient fill is a multi-stop gradient with at least three stops.
4. The method of claim 1 or 2 where said complex gradient fill is a collinear three- point gradient.
808245..pecl 7878771 .DOC COMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14.MAY.2007 17:01 14. MA. 17:U1SPRUSON FERGUSON 92615486NO475 P 294 NO-4785 P. 29/44 0 0 ci
5. The method of claim 1 or 2 where said complex gradient fill is one of a two-point gradient with an extend mode and a multi-stop gradient with an extend mode.
6. The method of any one of the preceding claims wherein said boundary comprises an outline of said graphical object.
7. The method of any one of claims 1 to 5 wherein said boundary comprises a bounding box enclosing said graphical object.
8. The method of claim 7 wherein the bounding box has edges aligned with axes of a drawing coordinate system in which the graphical object is to be rendered.
9. The method of claim 7 wherein the bounding box has edges aligned with respect to a coordinate system of the complex gradient fill. The method of claim 7, 8 or 9 wherein each said simple fill Ias an associated clip corresponding to the outline of said region, and said rendering step renders each said simple fill within the associated clip. 11. The method of claim 1 wherein each said region is defined by the steps of: choosing two consecutive stop points of the complex gradient fil; drawing lines at said points which are normal to the direction of the gradient fill; and extending said lines until they meet the boundary. 8OB245_,pecl 7878771l.DOO COMS ID No: SBMI-0736581 1 Received by IP Australia: Time 17:10 Date 2007-05-14 14-MAY-2007 17:02 14. AY. 007 7:02SPRUSON FERGUSON 92615486NO475 P 304 NO-4785 P. 30/44 12. The method of claim 6 where each said simple fill has an associated object whose outline is the intersection of said region and said outline of said graphical object. 005 13. The method of claim 10 wherein said rendering comprises incorporating N instructions regarding said simple fills and said associated clips into a display list, the display list including rendering instructions for an image including said graphical object, o and rendering the display list. 14. The method of claim 13 wherein said instructions regarding said simple fills are formed as a processed list including said clips associated with each of said simple fills, said method comprising the further steps of: retrieving a first entry front said processed list; adding the contents of said entry to the display list by: (ba) retrieving a clip and a simple fill from said entry, (bb) adding said clip to a current object clip of said display list; (be) adding said simple fill to the display list with the current object outline, and the current object clip; and (bd) removing said clip from the current object clip; repeating step until all entries in said processed list have been added to the display list. The method of claim 14 wherein said grapbical object includes a plurality of said complex gradient fills, and each said complex gradient fAll is processed into a 808245-specl 7687TTJ DOC COMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14 14-MAY-2007 17:02 14. AY. Q~7 7:U2SPRUSON FERGUSON 92615486NO475 P 314 NO-4785 P. 31/44 -26 corresponding one of said processed lists, and the fturther steps are performed upon each processed list to add the corresponding simple fills and clips to said display list. 16. A method of rendering a graphical object having a complex gradient fill defined by 00 5 a plurality of points, said method being substantially as described herein with reference to Figs. Ilto 6and 9and10of the drawings. 017. Apparatus for rendering a graphical object having a complex gradient fill defined by a, plurality of points, the apparatus comprising: means for identifyring a boundary associated with the complex gradient fill; processing means for processing the complex gradient fill by- identifying a region defined using at leat one point of the complex gradient fill and the boundary; (ii) creating a simple fill corresponding to the region; and (iii) repeating the steps and (ii) until a simple fill has been created for all said regions interecting the boundary and for which the complex gradient fill is defined, at least one of said simple fills being a two-point gradient fill; and rendering means for rendering said simple fills within said corresponding regions to form an output image for reproduction on an output device. 18. Computer apparatus for rendering a graphical object having a complex gradient fill defined by a plurality of points, the apparatus being substantially as described herein with reference to Fig. 7 and any one or more of Figs. I to 6 and 9 and 10 of the drawings. B00245 spedi 787877j .DOC COMS ID No: SBMI-0736581 1 Received by IP Australia: Time 17:10 Date 2007-05-14 14, MAY. 2007 17:02 SPRUSON FERGUSON 92615486 NO. 4785 P. 32/44 -27- 0 0 (N 19. A computer readable medium having a computer program recorded thereon, the program being executable by a computer apparatus to render a graphical object having a complex gradient fill defined by a plurality of points, the program comprising: code means for identifying a boundary associated with the complex gradient fill; 00 5 code means for processing the complex gradieat fill by: identifying a region defined using at least one point of the complex 0 gradient fill and the boundary; (ii) creating a simple fill corresponding to the region; and (iii) repeating the steps and (ii) until a simple fill has been created for all said regions intersecting the boundary and for which the complex gradient fill is defined, at least one of said simple fills being a two-point gradient fill; and code means for rendering said simple fills within said corresponding regions to form an output image for reproduction on an output device. 20. A computer readable medium having a computer program recorded thereon, the program being executable by a computer apparatus to render a graphical object having a complex gradient fill defined by a plurality of points, said program being substantially as described herein with reference to any one or more of Figs. 1 to 6 and 9 and 10 of the drawings. Dated this 14 'h day of May 2007 CANON KABUSHITI KAISHA Patent Attorneys for the Applicant Spruson&Ferguson 808245,speci 787877_1.D00 COMS ID No: SBMI-07365811 Received by IP Australia: Time 17:10 Date 2007-05-14
AU2007202158A 2007-05-14 2007-05-14 Simplifying complex gradients Abandoned AU2007202158A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
AU2007202158A AU2007202158A1 (en) 2007-05-14 2007-05-14 Simplifying complex gradients

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
AU2007202158A AU2007202158A1 (en) 2007-05-14 2007-05-14 Simplifying complex gradients

Publications (1)

Publication Number Publication Date
AU2007202158A1 true AU2007202158A1 (en) 2008-12-04

Family

ID=40134101

Family Applications (1)

Application Number Title Priority Date Filing Date
AU2007202158A Abandoned AU2007202158A1 (en) 2007-05-14 2007-05-14 Simplifying complex gradients

Country Status (1)

Country Link
AU (1) AU2007202158A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016050946A1 (en) * 2014-10-02 2016-04-07 Nagravision S.A. Accelerated image gradient based on one-dimensional data

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016050946A1 (en) * 2014-10-02 2016-04-07 Nagravision S.A. Accelerated image gradient based on one-dimensional data
CN106796732A (en) * 2014-10-02 2017-05-31 耐瑞唯信有限公司 Acceleration image gradient based on one-dimensional data
US10032435B2 (en) 2014-10-02 2018-07-24 Nagravision S.A. Accelerated image gradient based on one-dimensional data
CN106796732B (en) * 2014-10-02 2020-09-08 耐瑞唯信有限公司 Accelerated image gradients based on one-dimensional data
EP4270319A3 (en) * 2014-10-02 2023-11-08 Nagravision S.A. Accelerated image gradient based on one-dimensional data

Similar Documents

Publication Publication Date Title
US7257776B2 (en) Systems and methods for scaling a graphical user interface according to display dimensions and using a tiered sizing schema to define display objects
JP3618838B2 (en) Image output method
CN105955687B (en) Image processing method, device and system
CA2645746C (en) Method and graphical interface for embedding animated content into a computer application
US20060001681A1 (en) Method of rendering graphic objects
JP4091144B2 (en) A method for generating a display list, a method for receiving a display list and storing it in a graphics processor, a method for rendering a primitive, and a system for rendering a primitive using a display list
US8423883B1 (en) Systems and methods of creating and editing electronic content including multiple types of graphics
US20180150296A1 (en) Graphics processing apparatus and method of processing texture in graphics pipeline
KR20090075693A (en) Rendering and encoding glyphs
US10311060B2 (en) Glyph management in texture atlases
JP2001265314A (en) Display system, data display method, shadowed character font generating method, and recording medium
CN107621951B (en) View level optimization method and device
KR20080076933A (en) Transparency printing
AU2007202158A1 (en) Simplifying complex gradients
US7215342B2 (en) System and method for detecting and converting a transparency simulation effect
JP4143613B2 (en) Drawing method and drawing apparatus
JP4109740B2 (en) Convolutional scanning line rendering
US5937144A (en) Rasterized proxy of a vector image
KR20180037839A (en) Graphics processing apparatus and method for executing instruction
Limberger et al. OpenLL: an API for dynamic 2D and 3D labeling
AU695554B2 (en) Efficient methods for the evaluation of a graphical programming language
CA2969778A1 (en) Glyph management in texture atlases
JP5419440B2 (en) Graphics display device and graphical user interface execution device
AU2005200528B2 (en) Compositing with clip-to-self functionality without using a shape channel
AU721232B2 (en) Scan line rendering of convolutions

Legal Events

Date Code Title Description
MK1 Application lapsed section 142(2)(a) - no request for examination in relevant period