Canvas Nasal API: Difference between revisions

Jump to navigation Jump to search
m
Removed temp. statement
(Filled in some methods of Path)
m (Removed temp. statement)
Line 1: Line 1:
<big>Work in progress!! Just saved for backup.</big>


Canvas consist of a class with various nestable classes (elements).
Canvas consist of a class with various nestable classes (elements).


See the 2.10 API [https://gitorious.org/fg/fgdata/blobs/release/2.10.0/Nasal/canvas/api.nas here].
See inside the 2.10 API [https://gitorious.org/fg/fgdata/blobs/release/2.10.0/Nasal/canvas/api.nas here].


== Canvas ==
== Canvas ==
Line 143: Line 141:
Gets the center of the element.
Gets the center of the element.
== Group ==
== Group ==
Inherits from element.
Inherits from Element.
=== set ===
=== set ===
'''Parameters:''' (key, value)
'''Parameters:''' (key, value)
Line 212: Line 210:
Removes all the child elements from this group.
Removes all the child elements from this group.
== Text ==
== Text ==
Inherits from element.
Inherits from Element.


=== setText ===
=== setText ===
Line 263: Line 261:
Sets the color the text background should be drawn in.
Sets the color the text background should be drawn in.
== Path ==
== Path ==
Inherits from element.
Inherits from Element.


A path is similar to drawing with a pen on paper. The move and moveTo methods represent lifting the pen from the paper and moving to a new position. The drawing methods like lineTo would then be seen as starting from the current position of the pen. Therefore offcause the order the methods is called in, is important.
A path is similar to drawing with a pen on paper. The move and moveTo methods represent lifting the pen from the paper and moving to a new position. The drawing methods like lineTo would then be seen as starting from the current position of the pen. Therefore offcause the order the methods is called in, is important.
Line 359: Line 357:
=== addSegment ===
=== addSegment ===
== Map ==
== Map ==
Inherits from element.
Inherits from Element.


See: [[Canvas_Maps|Canvas Maps]] and [[Canvas_Map_API|Canvas Map API]]
See: [[Canvas_Maps|Canvas Maps]] and [[Canvas_Map_API|Canvas Map API]]
== Image ==
== Image ==
Inherits from element.
Inherits from Element.


See: [[Canvas_Image|Canvas Image]]
See: [[Canvas_Image|Canvas Image]]
579

edits

Navigation menu