Java Reference
In-Depth Information
Listing 11-4. GameAssets.fxz (bonusBalloon)
Group {
id: "bonusBalloon"
content: [
SVGPath {
fill: null
stroke: Color.rgb(0x9b,0x85,0x78)
strokeWidth: 1.0
content: "M426.43,585.43 Q428.83,581.53 428.83,580.02 C428.83,578.52
422.67,574.92 422.67,572.36 C422.67,569.81 427.03,564.40 427.03,562.00 C427.03,559.59
422.82,540.37 424.92,538.26 "
},
Polygon {
points: [422.84,537.66,420.09,543.59,427.92,543.59,425.81,537.03]
fill: LinearGradient{proportional: false startX: 420.09 startY:540.31
endX: 427.92 endY: 540.31 stops: [
Stop {offset: 0.000 color: Color.rgb(0xd4,0x47,0x99)},
Stop {offset: 1.000 color: Color.rgb(0x72,0x38,0x95)},
]}
stroke: null
},
SVGPath {
fill: LinearGradient{proportional: false startX: 409.17 startY:519.59
endX: 441.62 endY: 519.59 stops: [
Stop {offset: 0.000 color: Color.rgb(0xd4,0x47,0x99)},
Stop {offset: 1.000 color: Color.rgb(0x72,0x38,0x95)},
]}
stroke: null
content: "M441.62,519.59 C441.62,529.77 434.36,538.02 425.40,538.02
C416.44,538.02 409.17,529.77 409.17,519.59 C409.17,509.41 416.44,501.16 425.40,501.16
C434.36,501.16 441.62,509.41 441.62,519.59 Z "
},
Text {
transforms:
[Transform.affine(1.000000,0.000000,0.000000,1.000000,413.540470,525.303710)]
fill: Color.rgb(0xf9,0xed,0x33)
stroke: null
x: 0.0
y: 0.0
textOrigin: TextOrigin.BASELINE
font: Font.font( "ComicSansMS", FontWeight.REGULAR, FontPosture.REGULAR,
19.80)
content: "x2"
}, ]
}
In Listing 11-4 we can see that the Node with id equal to bonusBalloon is defined by a number of
SVGPath Nodes . The coordinates that comprise each SVGPath are defined in terms of the upper left of the
entire GameAssetUI . This means that when you set bonusBalloon's translateX and translateY to zero, it
is placed at the original location form the Illustrator file. If we look at Figure 11-3 we can see that the
Search WWH ::




Custom Search