Detailed Description

Used to describe how to render an SVG and where to.

Public Member Functions

void PopTransform (SVGElement by)
 Only pops if the given element had a transform to add earlier. More...
 
void PopTransform ()
 Always pops something. More...
 
void PushTransform (SVGElement by)
 
 RenderContext (SVG drawing, int w, int h)
 
void SetSize (int width, int height)
 Change the size of this context. This can potentially trigger a redraw. More...
 
void FillPath (Loonim.TextureNode fill, VectorPath transformedPath, bool evenOddFillMethod)
 
void StrokePath (Loonim.TextureNode stroke, VectorPath transformedPath, float width, SVGElement settings)
 Computes a stroke path now and adds it. More...
 
void AddViewBoxTransform (BoxRegion region, AspectRatio aspectRatio, SVGSVGElement frag)
 
void PushMatrix (Matrix4x4 matrix)
 
Matrix4x4 ScaleMatrix (float x, float y)
 Builds a scale matrix. More...
 
Matrix4x4 TranslateMatrix (float x, float y)
 Builds a translate matrix. More...
 
void SetClip (ScreenRegion region, bool reset)
 

Public Attributes

float Depth
 Current depth. More...
 
float PathAccuracy =0.05f
 The accuracy when triangulating paths In terms of 0-2 where 2 represents the lowest accuracy. More...
 
ScreenRegion ClipRegion
 Region to clip by. More...
 
TransformationStack Transformations =new TransformationStack()
 A stack of transformations to apply to elements. Updated during a layout event. More...
 
SVG Drawing
 The SVG being drawn. More...
 
Loonim.SurfaceTexture Filter
 The Loonim filter. More...
 

Package Functions

void BuildFilter ()
 Draws the SVG now. More...
 
void Draw ()
 

Properties

Transformation Transform [get]
 Transform at the top of the stack. More...
 
int Width [get]
 The last drawn width. More...
 
int Height [get]
 The last drawn height. More...
 
Texture Texture [get]
 The underlying texture. Remains the same even when SetSize is called; i.e. you only need to grab this once. More...
 

Private Attributes

Loonim.DrawInfo DrawInfo
 The Loonim draw info. More...
 
Loonim.Stack DrawStack
 The current Loonim stack. More...
 
Loonim.StrokePathMesh StrokeHelper =null
 Helps build stroke meshes. More...
 

Constructor & Destructor Documentation

Svg.RenderContext.RenderContext ( SVG  drawing,
int  w,
int  h 
)
inline

Member Function Documentation

void Svg.RenderContext.AddViewBoxTransform ( BoxRegion  region,
AspectRatio  aspectRatio,
SVGSVGElement  frag 
)
inline
void Svg.RenderContext.BuildFilter ( )
inlinepackage

Draws the SVG now.

void Svg.RenderContext.Draw ( )
inlinepackage
void Svg.RenderContext.FillPath ( Loonim.TextureNode  fill,
VectorPath  transformedPath,
bool  evenOddFillMethod 
)
inline
void Svg.RenderContext.PopTransform ( SVGElement  by)
inline

Only pops if the given element had a transform to add earlier.

void Svg.RenderContext.PopTransform ( )
inline

Always pops something.

void Svg.RenderContext.PushMatrix ( Matrix4x4  matrix)
inline
void Svg.RenderContext.PushTransform ( SVGElement  by)
inline
Matrix4x4 Svg.RenderContext.ScaleMatrix ( float  x,
float  y 
)
inline

Builds a scale matrix.

void Svg.RenderContext.SetClip ( ScreenRegion  region,
bool  reset 
)
inline
void Svg.RenderContext.SetSize ( int  width,
int  height 
)
inline

Change the size of this context. This can potentially trigger a redraw.

void Svg.RenderContext.StrokePath ( Loonim.TextureNode  stroke,
VectorPath  transformedPath,
float  width,
SVGElement  settings 
)
inline

Computes a stroke path now and adds it.

Matrix4x4 Svg.RenderContext.TranslateMatrix ( float  x,
float  y 
)
inline

Builds a translate matrix.

Member Data Documentation

ScreenRegion Svg.RenderContext.ClipRegion

Region to clip by.

float Svg.RenderContext.Depth

Current depth.

Loonim.DrawInfo Svg.RenderContext.DrawInfo
private

The Loonim draw info.

SVG Svg.RenderContext.Drawing

The SVG being drawn.

Loonim.Stack Svg.RenderContext.DrawStack
private

The current Loonim stack.

Loonim.SurfaceTexture Svg.RenderContext.Filter

The Loonim filter.

float Svg.RenderContext.PathAccuracy =0.05f

The accuracy when triangulating paths In terms of 0-2 where 2 represents the lowest accuracy.

Loonim.StrokePathMesh Svg.RenderContext.StrokeHelper =null
private

Helps build stroke meshes.

TransformationStack Svg.RenderContext.Transformations =new TransformationStack()

A stack of transformations to apply to elements. Updated during a layout event.

Property Documentation

int Svg.RenderContext.Height
get

The last drawn height.

Texture Svg.RenderContext.Texture
get

The underlying texture. Remains the same even when SetSize is called; i.e. you only need to grab this once.

Transformation Svg.RenderContext.Transform
get

Transform at the top of the stack.

int Svg.RenderContext.Width
get

The last drawn width.