Quartz.Sketch (Quartz v0.8.1)
View SourceFunctions to work with objects that implement the Sketch.Protocol.
Summary
Functions
Given a rendered and measured Resvg node, assign measurements to the sketch from the measurements of the node. This is used to assign width, height and depth to text elements and to other elements for which the only way to measure them is to render the,.
Get the baseline of the bounding box of a sketch.
Get the bottom of the bounding box of a sketch.
Get the bounding box bounds of a sketch.
Get the (horizontal) center of the bounding box of a sketch.
Get the height of the bounding box of a sketch.
Get the horizon (vertical center) of the bounding box of a sketch.
Get the left limit of the bounding box of a sketch.
Get the right limit of the bounding box of a sketch.
Get the top of the bounding box of a sketch.
Get the width of the bounding box of a sketch.
Draw a sketch inside a figure.
Get all the lengths in a sketch.
Render an object into SVG.
Render a sketch while setting its position to zero. What exactly means setting the position to zero is implementation-dependent.
Apply a transformation to the sketch's lengths. Which lengths must be transformed is implementation-dependent.
Types
@type length() :: Dantzig.Polynomial.t() | number()
@type t() :: any()
Functions
@spec assign_measurements_from_resvg_node(t(), %Resvg.Native.Node{ height: term(), id: term(), width: term(), x: term(), y: term() }) :: t()
Given a rendered and measured Resvg node, assign measurements to the sketch from the measurements of the node. This is used to assign width, height and depth to text elements and to other elements for which the only way to measure them is to render the,.
Get the baseline of the bounding box of a sketch.
Get the bottom of the bounding box of a sketch.
Get the bounding box bounds of a sketch.
Get the (horizontal) center of the bounding box of a sketch.
Get the height of the bounding box of a sketch.
Get the horizon (vertical center) of the bounding box of a sketch.
Get the left limit of the bounding box of a sketch.
Get the right limit of the bounding box of a sketch.
Get the top of the bounding box of a sketch.
Get the width of the bounding box of a sketch.
Draw a sketch inside a figure.
Get all the lengths in a sketch.
@spec to_svg(t() | binary()) :: Quartz.SVG.t()
Render an object into SVG.
@spec to_unpositioned_svg(t()) :: Quartz.SVG.t()
Render a sketch while setting its position to zero. What exactly means setting the position to zero is implementation-dependent.
This function is used to get the size (bbox dimensions) of a sketch.
Apply a transformation to the sketch's lengths. Which lengths must be transformed is implementation-dependent.
This function is used to substitute variables into their values in the lengths (position, size, etc.) of a sketch after solving for all the constraints.