Drawing applications operable on computing devices render images on displays of the computing devices. The drawing applications render basic shapes, such as lines, which form parts of more complicated images. Basic shapes rendered by the drawing applications should be rendered relatively quickly so that complicated images may also be rendered quickly.
Basic shapes, such as lines, often have properties that result in the lines being rendered relatively slowly. For example, lines may have a softness or gradients where generating the softness or gradients for the lines consumes a relatively large amount of processing power.
One simplified method for rendering lines is the use of stamps where a profile for a width of a line is determined for the stamp, and the stamp is stamped along a path in a user interface on the display for rendering lines. Line rendering methods using stamps often do not provide a desired softness, color gradient, etc. because the stamps have a width and rendered images of stamps on the user interface overlap one another. The overlapping of the stamps often renders lines harder than desired and having color gradient that is not consistent from end to end.
Described herein are techniques for rending lines by a drawing application where the lines have gradient opacities for a softened appearance.
According to one embodiment, a method for drawing a line having a gradient opacity across a width of the line includes receiving a path for rendering the line in a user interface, and rendering, by a computing device, a plurality of composite lines on a user interface along the path to form the line. The composite lines of the plurality of composite lines have different widths have an opacity and are multilayered along the path. The method further includes centering, by the computing device, longitudinal-centers of the plurality of composite lines with a center of the path. The opacity of the plurality of composite lines is additive across portions of the width of the line to form the gradient opacity.
According to another embodiment, a method for drawing a calligraphic line includes receiving a path for rendering the calligraphic line in a user interface, and determining, by a computing device, a number of composite lines to render for the calligraphic line to have the width. The method further includes rendering, by the computing device, the composite lines in a user interface in parallel along the path to form the calligraphic line.
According to one embodiment, a method for drawing a calligraphic line having a turning section along a longitude of the calligraphic line includes receiving a path for rendering the calligraphic line in a user interface. The method further includes rendering, by a computing device, a first plurality of composite lines on a user interface in parallel along the path to form a first side of the calligraphic line in the user interface, and rendering, by the computing device, a second plurality of composite lines on the user interface in parallel along the path to form a second side of the calligraphic line in the user interface. The first side of the calligraphic line and the second side of the calligraphic line are joined at the turning section. When the second side of the calligraphic line and the first side of the calligraphic line coincide at portions of the calligraphic line on the user interface, the second side of the calligraphic line replaces the first side of the calligraphic line at the portions.
Application server 105 may access an application storage 150 (a non-transitory computer readable medium), which stores application 145 according to one embodiment. Application server 105 may provide a copy of application 145 to computing device 110. For example, application 145 may be a web application operable in a browser environment of a browser 155 or a standalone application that does not operate in the browser environment. While application 145 is described as being provided to computing device 110 from application server 105, computing device may load application 145 from a disk memory, or the like.
Application 145 is a drawing program configured for user interaction via computing device 110 according to one embodiment. Application 145 may render images, such as computer drawings, in a user interface 146 displayed on display 147. Application 145 may draw lines in user interface 146 were the lines have a gradient opacity across a width of the lines. The gradient opacity makes the lines have a soft appearance. Application 145 may also draw lines in user interface 146 where the lines are drawn from a number of composite lines. The composite lines may have a variety of characteristics, such as a color gradient, where a line formed from the composite lines has the color gradient. Application 145 may also draw lines on a user interface where the lines have a turning section along a length of the lines. Methods described herein for drawing lines in user interface 146 provide for relatively fast rendering of the lines as will be described in detail below.
At 305, application 145 receives a path for rendering line 200 in user interface 146. The path may be created by dragging a pointer across user interface 146, or via coordinates entered in user interface 146.
At 310, application 145 renders composite lines 210 in user interface 146 along the path. The number of composite lines 210 rendered may be determined based on a width of line 200. For example, the number of composite lines 210 may be half the number of pixels of the width of line 200, such as when the number of pixels is even. For example, if line 200 is 100 pixels wide, the number of composite lines 200 may be 50. If the number of composite lines is half the number of pixels across the width of line 200, each composite line that is wider than a next narrower composite line is two pixels wider than the next narrower composite line. If longitudinal centers of all of composite lines 200 are centered (i.e., registered) along a center of the path, then each composite line that is wider than a next narrow composite line will extend by one pixel from both sides of the next narrower composite line. A pixel may be a pixel on display 147. Different displays 147 may have different width pixels as is well known.
The number of composite lines 210 rendered may be half the number of pixels of the width of line 200 plus one additional line if the number of pixels across the width of line 200 is odd. If the number of composite lines is half the number of pixels across the width of line 200 plus one additional composite line, each composite line that is wider than a next narrower composite line is two pixels wider than the next narrower composite line. If longitudinal centers of all of composite lines 210 are centered along a center of the path, then each composite line that is wider than a next narrow composite line will extend by one pixel from both sides of the next narrower composite line.
If the number of pixels across the width of line 200 is even, and the number of composite lines 210 is even, the composite line at the center of line 200 may be two pixels wide. If the number of pixels across the width of line 200 is odd, and the number of composite lines 210 is half the number of pixels across the width of line 200 plus one additional line, the composite line at the center of line 200 may be one pixel wide. In
According to one embodiment, composite lines 210 have the same opacities. According to an alternative embodiment, a center line (i.e., a first portion) of composite lines 210 has a first opacity, and the remainder (i.e., a second portion) of composite lines 210 has a second opacity. The first opacity may be full opacity and the second opacity is less than fully opaque to provide a gradient opacity (or softness) at the sides and ends of line 200. The width of the center line and the number of composite lines in the second portion of composite lines 210 may be based on a hardness (or alternatively a softness) of line 200. Hardness is a percentage of line 200 that is fully opaque along the longitudinal center of line 200 according to one embodiment. For example, if line 200 has a hardness of twenty percent, then twenty percent of the width of line 200 along the longitudinal center of line 200 is fully opaque, and eighty percent of line 200 has a gradient opacity. The width of the center line may be set to match the hardness of line 200. For example, if line 200 has a hardness of twenty percent, then the center line may have a width that is twenty percent of the width of line 200 along the longitudinal center of line 200. The remaining eighty percent of the width of line 200 is composed of the second portion of composite lines 200. More generally, the number of composite lines 210 in the second portion of composite lines 210 may be proportional to one minus the hardness (i.e., softness) of line 200. According to a specific embodiment, the number of composite lines 210 in the second portion of composite lines 210 may be the width of line 200 (e.g., in pixels) multiplied by the softness. A hardness value for line 200 may be received by application 145 from a user input via computing device 110. The user input may be received via user interface 146 of application 145.
At 315, the longitudinal-centers of the composite lines are centered along a center of the path (received at step 305) of line 200. Stated alternatively, the longitudinal-centers of the composite lines are registered with respect to one another and with respect to the center of the path of line 200.
According to one embodiment, subsequent to composite lines 210 being rendered in user interface 146, an input is received for changing the opacity of a least one of composite lines 210, and the at least one of composite lines 210 is changed in line 200 in user interface 146. Similarly, subsequent to composite lines 210 being rendered in user interface 146 an input may be received for changing the hardness of line 200, and the opacities of one or more composite lines 210 are changed in user interface 146 based on the hardness change. According to another embodiment, an input is received for manually changing the number of composite lines rendered in user interface 146 for line 200 to adjust the gradient opacity of line 200, and the number of composite lines 210 is changed in user interface 146 accordingly.
At 505, application 145 receives a path for rendering calligraphic line 400 in user interface 146 on display 127. The path may be created by dragging a pointer across user interface 146, or via coordinate entered in user interface 146.
At 510, application 145 determines a number of composite lines 410 for rendering calligraphic line 400 so that calligraphic line 400 has the width. The number of composite lines in the set of composite lines 410 may be the same as the number of pixels across the width of calligraphic line 400 or may be a percentage of the number of pixels across the width of calligraphic line 400.
At 515, application 145 receives a selection for a first color and a second color for the color gradient of the calligraphic line. The selection for the first color and the second color may be received by computing device 110 via user interface 146 of application 145. If calligraphic line 400 includes two or more color gradients, the colors (e.g., three or more colors) for the two or more color gradients may be received at 515.
At 520, a number of colors of the color gradient is set equal to the number of composite lines in the set of composite lines 410. The colors of the color gradient are a mix of the first color and the second color received at 515. If calligraphic line 400 includes two or more color gradients, the colors for the two or more color gradients may be assigned to different portions of composite lines 410.
At 525, the color gradient is assigned to composite lines 410 where the color gradient transitions from the first color to the second color across the width of the calligraphic line.
At 530, user interface 146 renders composite lines 410 in parallel along the path to form calligraphic line 400. One of composite lines 410 disposed along a first side of calligraphic line 400 may have the first color without having any of the second color mixed with the first color, and another of composite lines 410 along a second side of calligraphic line 400 may have the second color without any of the first color mixed with the second color so that the color gradient is relatively uniform across calligraphic line 400.
At 705, application 145 receives a path for rendering calligraphic line 600 in user interface 146.
At 705, application 145 renders composite lines 610 in parallel along the path to form a first side 630 of calligraphic line 600 in user interface 146.
At 715, application 145 renders composite lines 620 in parallel along the path to form a second side 635 of calligraphic line 600 in user interface 146. First side 630 and second side 635 of calligraphic line 600 meet at turning section 624 according to one embodiment. If second side 635 of calligraphic line 600 and first side 630 coincide (i.e., overlap) at portions of the calligraphic line, the second side of the calligraphic line replaces the first side of the calligraphic line at the portions.
According to one embodiment, the shape of turning section 624 may be user defined and/or may be selected from a number of shapes provided by application 145. Prior to rendering calligraphic line 600 the shape of turning section 624 may be received by application 145 from a user input to computing device 110. According to a further embodiment, the shape of turning section 624 may be changed after composite lines 610 and 620 are rendered in user interface 146 and the changed shape may be applied to calligraphic line 600 in user interface 146.
According to a further embodiment, calligraphic line 600 includes a number of turning sections 624, which have a number of shapes. Various sets of composite lines may be rendered in user interface 146 where the sets of composite line meet at turning sections 624. Further, each set of composite line 610 and 620 may have various capricious shapes (e.g., flat, rounded, etc.) along the profiles (i.e., widths) of the sets of the composite lines. The shapes of sets of composite lines 610 and 620 are shown as relatively flat in
Line 200, 400, and 600 rendered by application 145 may be rendered relatively quickly because lines 200, 400, and 600 rendered by rendering composite lines 210, 410, and 610, respectively. Lines, such as composite lines 210, 410, and 610, are basic shapes provided by browsers, standalone drawing applications, etc. where the composite lines are rendered relatively quickly. That is browsers, standalone drawings applications, and the like are typically optimized for rendering lines, such as composite line, relatively quickly. Therefore, generating a line from composite lines provides that the line may also be rendered relatively quickly.
Referring again to
As used in the description herein and throughout the claims that follow, “a”, “an”, and “the” includes plural references unless the context clearly dictates otherwise. Also, as used in the description herein and throughout the claims that follow, the meaning of “in” includes “in” and “on” unless the context clearly dictates otherwise.
The above description illustrates various embodiments, along with examples of how aspects thereof may be implemented. The above examples and embodiments should not be deemed to be the only embodiments, and are presented to illustrate the flexibility and advantages of the teachings hereof. Based on the above disclosure and the following claims, other arrangements, embodiments, implementations, and equivalents may be employed without departing from the scope hereof, as defined by the claims.
Number | Name | Date | Kind |
---|---|---|---|
5430834 | Takahashi et al. | Jul 1995 | A |
5687259 | Linford | Nov 1997 | A |
5845299 | Arora et al. | Dec 1998 | A |
5977981 | Brown | Nov 1999 | A |
6084598 | Chekerylla | Jul 2000 | A |
6771291 | DiStefano | Aug 2004 | B1 |
6803913 | Fushiki et al. | Oct 2004 | B1 |
6954903 | Richard | Oct 2005 | B2 |
7000184 | Matveyenko et al. | Feb 2006 | B2 |
7086013 | Saund et al. | Aug 2006 | B2 |
7133050 | Schowtka | Nov 2006 | B2 |
7287227 | Ries et al. | Oct 2007 | B2 |
7444597 | Perantatos et al. | Oct 2008 | B2 |
7461346 | Fildebrandt | Dec 2008 | B2 |
7543267 | Lindhorst et al. | Jun 2009 | B2 |
7764286 | Kumar | Jul 2010 | B1 |
7770122 | Shaik | Aug 2010 | B1 |
7779359 | Francis et al. | Aug 2010 | B2 |
7812850 | Nelson | Oct 2010 | B1 |
7884834 | Mouilleseaux et al. | Feb 2011 | B2 |
8120620 | Yamauchi | Feb 2012 | B2 |
8171399 | Coppedge | May 2012 | B2 |
8250486 | Lentz | Aug 2012 | B2 |
8255814 | Arvin | Aug 2012 | B2 |
8335389 | Ishida | Dec 2012 | B2 |
8381093 | Mohan | Feb 2013 | B2 |
8487963 | Harris et al. | Jul 2013 | B1 |
8547403 | Stiglitz | Oct 2013 | B1 |
8555200 | Hicks et al. | Oct 2013 | B2 |
20020093538 | Carlin | Jul 2002 | A1 |
20030226111 | Wirts et al. | Dec 2003 | A1 |
20040012617 | Beaumont et al. | Jan 2004 | A1 |
20060005114 | Williamson et al. | Jan 2006 | A1 |
20060041564 | Jain et al. | Feb 2006 | A1 |
20060288312 | Akiyama et al. | Dec 2006 | A1 |
20070174027 | Moiseyev | Jul 2007 | A1 |
20080275964 | McCollum et al. | Nov 2008 | A1 |
20090019370 | Pally | Jan 2009 | A1 |
20100011309 | Mitra | Jan 2010 | A1 |
20100083146 | Hasuike et al. | Apr 2010 | A1 |
20100302245 | Best | Dec 2010 | A1 |
20110015917 | Wang | Jan 2011 | A1 |
20110250706 | Huff | Oct 2011 | A1 |
20120133667 | Lachoff | May 2012 | A1 |
20120246554 | Shappir | Sep 2012 | A1 |
20120266061 | Williamson et al. | Oct 2012 | A1 |
20120278701 | Bockus et al. | Nov 2012 | A1 |
20120293558 | Dilts | Nov 2012 | A1 |
20120324332 | Zaragoza et al. | Dec 2012 | A1 |
20130120426 | DiVerdi et al. | May 2013 | A1 |
20130179805 | Wyser | Jul 2013 | A1 |
Entry |
---|
Adobe Labs, Adobe Edge Preview, “Motion and Interaction Design for HTML5”, http://labs.adobe.com/technologies/edge/ as archived by The Wayback Machine on May 3, 2012 at 13:55:05, accessed via http://web.archive.org/web/20120503135505/http://labs.adobe.com/technologies/edge/ on Jan. 29, 2015, 2 pages. |
Bidelman, “Native HTML5 Drag and Drop”, Sep. 30, 2010, 9 pages, http://www.html5rocks.com/en/tutorials/dnd/basics/. |
Chapman, “Ultimate Guide to Website Wireframing”, Nov. 1, 2010, 37 pages, http://sixrevisions.com/user-interface/website-wireframing/. |
McGarry, “Kutout—An Application for Cutting Out Images”, Mar. 30, 2010, 9 pages. |
Mozilla Development Network, “Pixel Manipulation with Canvas”, retrieved Apr. 18, 2012, 4 pages, https://developer.mozilla.org/En/HTML/Canyas/Pixel—manipulation—with—canvas. |
Stack Overflow, Any Way to Clone HTML5 Canvas Element with its Content?, retrieved Apr. 18, 2012, 2 pages, http://stackoverflow.com/questions/3318565/any-way-to-clone-html5-canvas-element-with-its-content. |
Stack Overflow, How to Drag and Drop from one HTML5 Canvas to Another, retrieved Apr. 18, 2012, 2 pages, http://stackoverflow.com/questions/4599801/how-to-drag-and-drop-from-one-html5-canvas-to-another. |
Sucan, “Creating an HTML 5 Canvas Painting Application”, Dev. Opera, Mar. 17, 2009, 10 pages, http://devopera.com/articles/view/html5-canvas-painting/. |
Word 2007: Flowcharts, Information Technology Services, pp. Nov. 10, 2009, 11 pages, https://web.archive.org/web/20091110074856/http://ase.tufts.edu/its/trainDocuments/word07Flowcharts.pdf>. |
Indeeo, “iDraw User Guide iDraw for Mac OS X” 2011, v2.02, 67 pages. |
Adobe Systems, “Illustrator Help/ Help and Tutorials”, May 16, 2012, 4 pages, http://tv.adobe.com/watch/learn-illustrator-cs5/creating-complex-art-with-the-shape-builder-tool-/#. |
You Tube, “Digital Calligraphy—Playing with a 3D Letter e—40 fps”, May 16, 2012, 2 pages, http://www.youtube.com/watch?v=FiGNI1TEzA4&feature=related. |
Adobe, Adobe Dreamweaver CS6, 2012, http://www.adobe.com/products/dreamweaver.html, pp. 2. |
“Microsoft® PowerPoint® 2010 Bible,” Faithe Wempen, ISBN: 9780470591864, 2010, Wiley Publications inc., Chapter 1 : A first look at PowerPoint. |
“Microsoft® PowerPoint® 2010 Bible,” Faithe Wempen, ISBN: 9780470591864, 2010, Wiley Publications inc., Chapter 10 : Drawing and Formatting Objects. |
Sencha, Sencha—Architect—2—2012, http://www.sencha.com, pp. 1. |
Number | Date | Country | |
---|---|---|---|
20130342560 A1 | Dec 2013 | US |