Struct svg2gcode::Turtle [−][src]
pub struct Turtle<'input> {
pub machine: Machine<'input>,
// some fields omitted
}Expand description
Turtle graphics simulator for paths that outputs the g-code representation for each operation. Handles transforms, position, offsets, etc. See https://www.w3.org/TR/SVG/paths.html
Fields
machine: Machine<'input>Implementations
Move the turtle to the given absolute/relative coordinates in the current transform https://www.w3.org/TR/SVG/paths.html#PathDataMovetoCommands
Close an SVG path, cutting back to its initial position https://www.w3.org/TR/SVG/paths.html#PathDataClosePathCommand
Draw a line from the current position in the current transform to the specified position https://www.w3.org/TR/SVG/paths.html#PathDataLinetoCommands
Draw a cubic curve from the current point to (x, y) with specified control points (x1, y1) and (x2, y2) https://www.w3.org/TR/SVG/paths.html#PathDataCubicBezierCommands
Draw a shorthand/smooth cubic bezier segment, where the first control point was already given https://www.w3.org/TR/SVG/paths.html#PathDataCubicBezierCommands
Draw a shorthand/smooth cubic bezier segment, where the control point was already given https://www.w3.org/TR/SVG/paths.html#PathDataQuadraticBezierCommands
Draw a quadratic bezier segment https://www.w3.org/TR/SVG/paths.html#PathDataQuadraticBezierCommands
Draw an elliptical arc segment https://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands
Push a generic transform onto the stack Could be any valid CSS transform https://drafts.csswg.org/css-transforms-1/#typedef-transform-function https://www.w3.org/TR/SVG/coords.html#InterfaceSVGTransform
Pop a generic transform off the stack, returning to the previous transform state This means that most recent transform went out of scope
Remove all transforms, returning to true absolute coordinates