JohnnyOpcode / degrafa

Automatically exported from code.google.com/p/degrafa
1 stars 0 forks source link

Drawing a GeometryComposition onto a Canvas moved by a layout misaligns drawing #93

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
* What steps will reproduce the problem?
1. Create a canvas and assign it as the graphicstarget of a geometrycomposition
2. Place the canvas inside of a container with a layout set that affects 
position (not just size)

(see attached project)

* What is the expected output? What do you see instead?

Drawing appears to the side of the canvas--should appear on top.

* What version of the product are you using? On what operating system?

Only tested in flex 4 (using the flex 4 beta download), no idea if this is an 
issue in flex 3.

* Please provide any additional information below.

It looks like the bounds of the drawing are being copied from the layout, which 
has an x and y set.  The canvas is already moved by these x and y amounts 
though, so they are double-counted and the drawing gets moved too far.

Explicitly setting the bounds x and y to zero seems to solve the problem (see 
attached patch).

Original issue reported on code.google.com by j.matthe...@gmail.com on 12 Oct 2010 at 1:05

Attachments: