tags:

views:

17

answers:

1

In the following code I am trying to make a hexagon using points I derived by hand for the unit hex and then I would like to scale it up. However, it does not work. Instead of of a white hex with a green border I get a solid green hex. Am I misunderstanding the effect of the transformation Scale? It seems to start with the unit hex and paint out all the way to the scaled out hex, thus the color. Or is that again a misunderstanding?

How do I get a scalable shape with border width X and desired color fill?

Polygon {
     points: [1, 0, 0.5, -0.866, -0.5, -0.866, -1, 0, -0.5, 0.866, 0.5, 0.866]
     fill: Color.WHITE
     translateX: 100
     translateY: 100
     strokeWidth: 2
     transforms: Scale {x: 20, y: 20}
     stroke: Color.GREEN
     opacity: 0.3
}