jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Griffon
  • GRIFFON-154

GfxBuilder: Line node cannot be used by itself

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 0.9.2-rc1
  • Component/s: Builders
  • Labels:
    None

Description

As it is explained at http://blog.chuidiang.com/2010/03/21/sigo-jugando-con-gfxbuilder, the following code from grails-j2d plugin fails to produce a picture with a single line

def graph = {
   renderImage(width: 520, height: 540) {
      line( x1: 10, y1: 20, x2: 300, y2: 40, borderColor: 'red', borderWidth: 3 )
   }
}

However adding other elements (like a circle) does make the line appear.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Alexander Klein added a comment - 17/Feb/11 1:01 PM

A line is an unclosed Shape and unclosed Shapes will be closed automatically when added to an Area.
As a line is not closable, the bounds of this Area is [0,0,0,0] (empty).
This aswell can happen to other outlines aswell when they are straight.

This is known/intended as of the Area javadoc.

When you add another Shape (other than a line) then the combination will have a size and everything will be shown correctly.

I solved it by temporarily adding an invisible RectangleNode around each 'empty' outline if is used in a group().

Show
Alexander Klein added a comment - 17/Feb/11 1:01 PM A line is an unclosed Shape and unclosed Shapes will be closed automatically when added to an Area. As a line is not closable, the bounds of this Area is [0,0,0,0] (empty). This aswell can happen to other outlines aswell when they are straight. This is known/intended as of the Area javadoc. When you add another Shape (other than a line) then the combination will have a size and everything will be shown correctly. I solved it by temporarily adding an invisible RectangleNode around each 'empty' outline if is used in a group().
Hide
Permalink
Alexander Klein added a comment - 17/Feb/11 1:58 PM

gfxbuilder-0.4 included into gfxbuilder-plugin 0.6

Show
Alexander Klein added a comment - 17/Feb/11 1:58 PM gfxbuilder-0.4 included into gfxbuilder-plugin 0.6

People

  • Assignee:
    Alexander Klein
    Reporter:
    Andres Almiray
Vote (0)
Watch (2)

Dates

  • Created:
    25/Mar/10 11:38 AM
    Updated:
    21/Mar/11 4:18 PM
    Resolved:
    17/Feb/11 1:58 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.