|
|
| TurtleDDLayer (int8_t layerId) |
| | for internal use only
|
| |
|
void | forward (int distance, bool withPen=true) |
| | forward; with pen or not
|
| |
|
void | backward (int distance, bool withPen=true) |
| | backward; with pen or not
|
| |
|
void | leftTurn (int angle) |
| | left turn
|
| |
|
void | rightTurn (int angle) |
| | right turn
|
| |
|
void | home (bool withPen=true) |
| | go home (0, 0); with pen or not
|
| |
|
void | goTo (int x, int y, bool withPen=true) |
| | go to (x, y); with pen or not
|
| |
|
void | goBy (int byX, int byY, bool withPen=true) |
| | go by (byX, byY); with pen or not
|
| |
|
void | setHeading (int angle) |
| | set heading angle (degree)
|
| |
|
void | penSize (int size) |
| | set pen size
|
| |
| void | penColor (const String &color) |
| |
| void | fillColor (const String &color) |
| |
|
void | noFillColor () |
| | set no fill color
|
| |
|
void | penFilled (bool filled=true) |
| | set pen filled or not; if filled, shape drawn will be filled
|
| |
|
void | setTextSize (int size) |
| | set text size
|
| |
| void | setTextFont (const String &fontName="", int textSize=0) |
| |
|
void | penUp () |
| | pen up
|
| |
|
void | penDown () |
| | pen down
|
| |
|
void | beginFill () |
| |
|
void | endFill () |
| |
|
void | dot (int size, const String &color) |
| | draw a dot
|
| |
|
void | circle (int radius, bool centered=false) |
| | draw circle; centered or not
|
| |
|
void | oval (int width, int height, bool centered=false) |
| | draw oval; centered or not
|
| |
|
void | arc (int width, int height, int startAngle, int sweepAngle, bool centered=false) |
| | draw arc; centered or not
|
| |
|
void | triangle (int side1, int angle, int side2) |
| | draw triangle (SAS)
|
| |
|
void | isoscelesTriangle (int side, int angle) |
| | draw isosceles triangle; given size and angle
|
| |
|
void | rectangle (int width, int height, bool centered=false) |
| | draw rectangle; centered or not
|
| |
|
void | polygon (int side, int vertexCount) |
| | draw polygon given side and vertex count
|
| |
| void | centeredPolygon (int radius, int vertexCount, bool inside=false) |
| |
|
void | write (const String &text) |
| | write text
|
| |
|
void | drawText (const String &text) |
| | draw text (honor heading)
|
| |
| void | write (const String &text, bool draw) |
| |
| void | addLevel (const String &levelId, float width, float height, bool switchToIt=false) |
| |
|
void | addLevel (const String &levelId, bool switchToIt=false) |
| | another version of addLevel()
|
| |
|
void | addTopLevel (const String &levelId, float width=0, float height=0, bool switchToIt=false) |
| | like addLevel() but add to the top (i.e. will be drawn last)
|
| |
|
void | addTopLevel (const String &levelId, bool switchToIt) |
| | another version of addTopLevel()
|
| |
| void | switchLevel (const String &levelId, bool addIfMissing=true) |
| |
|
void | pushLevel () |
| | push the current level onto the level stack, to be pop with popLevel()
|
| |
| void | pushLevelAndSwitchTo (const String &switchTolevelId, bool addIfMissing=true) |
| |
|
void | popLevel () |
| | pop a level from the level stack and make it the current level
|
| |
| void | levelOpacity (int opacity) |
| |
|
void | levelTransparent (bool transparent) |
| | set whether level is transparent
|
| |
|
void | setLevelAnchor (float x, float y, long reachInMillis=0) |
| | set the anchor of the level; note that level anchor is the top-left corner of the level "opening"
|
| |
|
void | moveLevelAnchorBy (float byX, float byY, long reachInMillis=0) |
| | move the level anchor
|
| |
| void | registerLevelBackground (const String &backgroundId, const String &backgroundImageName, const String &drawBackgroundOptions="") |
| |
| void | exportLevelAsRegisteredBackground (const String &backgroundId, bool replace=true) |
| |
| void | setLevelBackground (const String &backgroundId, const String &backgroundImageName="", const String &drawBackgroundOptions="") |
| |
|
void | setLevelNoBackground () |
| | set that the current level uses no background image
|
| |
| void | animateLevelBackground (float fps, bool reset=true, const String &options="") |
| |
| void | stopAnimateLevelBackground (bool reset=true) |
| |
| void | reorderLevel (const String &levelId, const String &how) |
| |
|
void | exportLevelsAsImage (const String &imageFileName, bool cacheItNotSave=false) |
| | export (and save) the levels as an image (without the decorations of the layer like border)
|
| |
|
void | deleteLevel (const String &levelId) |
| | delete the specified level
|
| |
| void | border (float size, const String &color, const String &shape="flat", float extraSize=0) |
| |
| void | noBorder () |
| |
| void | padding (float size) |
| |
| void | padding (float left, float top, float right, float bottom) |
| |
| void | noPadding () |
| |
| void | margin (float size) |
| |
| void | margin (float left, float top, float right, float bottom) |
| |
| void | noMargin () |
| |
| void | backgroundColor (const String &color, int opacity=100) |
| |
| void | noBackgroundColor () |
| |
| void | backgroundImage (const String &backgroundImageName, const String &drawBackgroundOptions, int refImageWidth=0) |
| |
|
void | noBackgroundImage () |
| | set no layer background image
|
| |
| void | exportAsBackgroundImage (bool replace=true, bool noDrawBackground=true, int exportAsWidth=0) |
| |
| void | animateBackgroundImage (float fps, bool reset=true, const String &options="") |
| |
| void | stopAnimateBackgroundImage (bool reset=true) |
| |
| void | visible (bool visible) |
| |
| void | transparent (bool transparent) |
| |
| void | disabled (bool disabled=true) |
| |
| void | opacity (int opacity) |
| |
| void | alpha (int alpha) |
| |
| void | blend (const String &color, int alpha=255, const String &mode="darken") |
| |
| void | noblend () |
| |
|
void | clear () |
| | clear the layer
|
| |
|
void | flash () |
| | normally used for "feedback" – flash the default way (layer + border)
|
| |
|
void | flashArea (int x, int y) |
| | normally used for "feedback" – flash the area (x, y) where the layer is clicked
|
| |
| void | explicitFeedback (int16_t x=0, int16_t y=0, const String &text="", DDFeedbackType type=DDFeedbackType::CLICK, const String &option="") |
| |
|
const String & | getLayerId () const |
| |
| void | setFeedbackHandler (DDFeedbackHandler handler, const String &autoFeedbackMethod="", const String &allowFeedbackTypes="") |
| |
| void | enableFeedback (const String &autoFeedbackMethod="", const String &allowFeedbackTypes="") |
| |
|
void | disableFeedback () |
| | disable "feedback"
|
| |
| const DDFeedback * | getFeedback () |
| |
|
void | debugOnly (int i) |
| | for debug use
|
| |
| DDFeedbackManager * | getFeedbackManager () const |
| |
| DDFeedbackHandler | getFeedbackHandler () const |
| |