1.0.3
static void Reset ()
Roundness design, used for DrawArc().
static Polygon CreatePolygon ()
static Polygon CreatePolygon ( int pointCapacity )
static Polygon CreatePolygon ( Vector2[] points )
static Polygon CreatePolygon ( List<Vector2> points )
Creates a new Polygon to be drawn using Plot.DrawPolygon(). Points must be provided in clockwise order.
static Polyline CreatePolyline ()
static Polyline CreatePolyline ( int pointCapacity )
static Polyline CreatePolyline ( Vector2[] points )
static Polyline CreatePolyline ( List<Vector2> points )
Creates a new Polyline to be drawn using Plot.DrawPolyline(). Points must be provided in clockwise order.
static Text CreateText ( String content )
Creates a new Text to be drawn using Plot.DrawText().
static void AdaptTextCount ( int count, List<Text> texts )
Adapts a list of Texts by destroying and creating new ones as needed.
static void DrawCircle ()
static void DrawCircle ( float x, float y, float diameter )
static void DrawCircle ( Vector2 position, float diameter )
Submit a circle shape instance for rendering.
static void DrawRing ( float x, float y, float innerDiameter, float outerDiameter )
static void DrawRing ( Vector2 position, float innerDiameter, float OuterDiameter )
Submit a ring shape instance for rendering.
static void DrawPie ( float x, float y, float diameter, float beginAngle, float deltaAngle, float cutOff, float roundness )
static void DrawPie ( Vector2 position, float diameter, float beginAngle, float deltaAngle, float cutOff, float roundness )
Submit a pie shape instance for rendering.
static void DrawArc ( float x, float y, float innerDiameter, float outerDiameter, float beginAngle, float deltaAngle, float cutOff, float roundness, bool useGeometricRoundness, bool constrainAngleSpanToRoundness )
static void DrawArc ( Vector2 position, float innerDiameter, float outerDiameter, float beginAngle, float deltaAngle, float cutOff, float roundness, bool useGeometricRoundness, bool constrainAngleSpanToRoundness )
Submit an arc shape instance for rendering.
static void DrawRect ( float x, float y, float width, float height )
static void DrawRect ( float x, float y, float width, float height, float roundness )
static void DrawRect ( float x, float y, float width, float height, float lowerLeftRoundness, float upperLeftRoundness, float upperRightRoundness, float lowerRightRoundness )
static void DrawRect ( Vector2 position, float width, float height, float lowerLeftRoundness, float upperLeftRoundness, float upperRightRoundness, float lowerRightRoundness )
static void DrawRect ( Vector2 position, float width, float height, float roundness )
Submit a rect shape instance for rendering.
static void DrawSquare ( float x, float y, float size )
static void DrawSquare ( float x, float y, float size, float roundness )
static void DrawSquare ( float x, float y, float size, float lowerLeftRoundness, float upperLeftRoundness, float upperRightRoundness, float lowerRightRoundness )
static void DrawSquare ( Vector2 position, float size, float lowerLeftRoundness, float upperLeftRoundness, float upperRightRoundness, float lowerRightRoundness )
static void DrawSquare ( Vector2 position, float size, float roundness )
Submit a square shape instance for rendering.
static void DrawLine ( float ax, float ay, float bx, float by )
static void DrawLine ( float ax, float ay, float bx, float by, StrokeCap caps )
static void DrawLine ( float ax, float ay, float bx, float by, StrokeCap beginCap, StrokeCap endCap )
static void DrawLine ( Vector2 positionA, Vector2 positionB, StrokeCap beginCap, StrokeCap endCap )
static void DrawLine ( Vector2 positionA, Vector2 positionB, StrokeCap caps )
static void DrawLine ( Vector2 positionA, Vector2 positionB )
Submit a line shape instance for rendering.
static void DrawPolygon ( Polygon polygon )
Submit a polygon shape instance for rendering.
static void DrawPolyline ( Polyline polyline, StrokeCap beginCap, StrokeCap endCap )
static void DrawPolyline ( Polyline polyline, StrokeCap caps )
Submit a polyline shape instance for rendering.
static void DrawText ( Text text, float x, float y, float fieldwidth, float fieldHeight, bool drawFieldDebugRect )
static void DrawText ( Text text, Vector2 position, Vector2 fieldSize, bool drawFieldDebugRect )
Submit a text instance for rendering.
static void SetFillColor ( float brightness )
static void SetFillColor ( float brightness, float alpha )
static void SetFillColor ( float red, float green, float blue )
static void SetFillColor ( float red, float green, float blue, float alpha )
static void SetFillColor ( Color color, float alphaOverride )
static void SetFillColor ( Color color )
Set the fill color to be used for subsequently drawn shapes.
static void SetNoFill ()
Set no fill for subsequently drawn shapes.
static void SetStrokeColor ( float brightness )
static void SetStrokeColor ( float brightness, float alpha )
static void SetStrokeColor ( float red, float green, float blue )
static void SetStrokeColor ( float red, float green, float blue, float alpha )
static void SetStrokeColor ( Color color, float alphaOverride )
static void SetStrokeColor ( Color color )
Set the stroke color to be used for subsequently drawn shapes.
static void SetStrokeWidth ( float width )
Set the stroke width (thickness) to be used for subsequently drawn shapes.
static void SetNoStroke ()
Set no stroke for subsequently drawn shapes.
static void SetStrokeAlignement ( StrokeAlignment alignment )
Set the stroke alignment to be used for subsequently drawn shapes.
static void SetStrokeCornerProfile ( StrokeCornerProfile cornerStyle )
Set the stroke corner profile to be used for subsequently drawn shapes.
static void SetAntiAliasing ( bool isOn )
Enable or disable pixel shader SDF based antialisaing for all subsequently drawn shapes. Note that edge alignment between shapes will not be seamless when anti-alisation is enabled.
static void SetBlend ( Blend blend )
Set the blend mode used for subsequently drawn shapes.
static void SetLayer ( int layer )
Set the layer used for subsequently drawn shapes. Does not work for DrawNow methods, just like Graphics.DrawMeshNow not regarding layers.
static void SetPivot ( Pivot pivot )
Set the point from which Circle will be drawn. Default is Pivot.Center.
static void SetTextFont ( TMP_FontAsset font )
Set the font used for subsequently drawn texts.
static void SetTextSize ( float textSize )
Set the size to be used for subsequently drawn texts in world space scale.
static void SetTextAlignment ( TextAlignmentOptions alignment )
Set the alignment to be used for subsequently drawn texts.
static void SetFillTexture ( Texture texture )
Set the fill texture to be used for subsequently drawn shapes. See also SetFillTextureUVRect, SetFillTextureBlend and SetFillTextureTint.
static void SetNoFillTexture ()
Disable fill texture for subsequently drawn shapes.
static void SetFillTextureUVRect ( Rect uvRect )
static void SetFillTextureUVRect ( float x, float y, float width, float height )
Set the uv rect to be used for subsequently drawn shapes that has a fill texture.
static void SetFillTextureBlend ( FillTextureBlend blend )
Set the texture blend mode to be used for subsequently drawn shapes that has a fill texture.
static void PushStyle ()
Push (save) the current style to the stack.
static void PopStyle ()
Pop (load) the last pushed style from the stack.
static Style GetStyle ()
Copy and return the current style.
static void SetStyle ( Style style )
Overwrite the current style.
static void PushCanvasAndStyle ()
Shorthand for PushCanvas() and PushStyle().
static void PopCanvasAndStyle ()
Shorthand for PushCanvas() and PushStyle().
static void SetFillTextureTint ( float brightness )
static void SetFillTextureTint ( float brightness, float alpha )
static void SetFillTextureTint ( float red, float green, float blue )
static void SetFillTextureTint ( float red, float green, float blue, float alpha )
static void SetFillTextureTint ( Color color, float alphaOverride )
static void SetFillTextureTint ( Color tint )
Set the texture tint to be used for subsequently drawn shapes that has a fill texture.
static void PushCanvas ()
Shorthand for PushCanvas() and PushStyle().
static void PopCanvas ()
Shorthand for PushCanvas() and PushStyle().
static Matrix4x4 GetCanvas ()
Get the current canvas transformation matrix.
static void SetCanvas ( Matrix4x4 matrix )
static void SetCanvas ( Transform transform )
Overwrite the current canvas transformation matrix.
static void TranslateCanvas ( float x, float y )
static void TranslateCanvas ( float x, float y, float z )
static void TranslateCanvas ( Vector2 translation )
static void TranslateCanvas ( Vector3 translation )
Translate the current canvas transformation matrix.
static void RotateCanvas ( float angleZ )
static void RotateCanvas ( float angleX, float angleY, float angleZ )
static void RotateCanvas ( Quaternion rotation )
Rotate the current canvas transformation matrix by angle (in degrees).
static void ScaleCanvas ( float scaleXYZ )
static void ScaleCanvas ( float scaleX, float scaleY )
static void ScaleCanvas ( float scaleX, float scaleY, float scaleZ )
static void ScaleCanvas ( Vector2 scale )
static void ScaleCanvas ( Vector3 scale )
Scale the current canvas transformation matrix.
static void BeginDrawNowToRenderTexture ( RenderTexture rt )
static void BeginDrawNowToRenderTexture ( RenderTexture rt, Space space )
static void BeginDrawNowToRenderTexture ( RenderTexture rt, Color clearColor )
static void BeginDrawNowToRenderTexture ( RenderTexture rt, Space space, Color clearColor )
Begin a DrawNowToRenderTexture session. Call DrawXNow subsequently (for example DrawCircleNow) and don't forget to call EndDrawNowToTexture when you are done. For Space.Normalized 0,0 is center. Left, right, top and bottom is ( -aspect, aspect, -1, 1 ). For Space.Pixels 0,0 is in upper left corner.
static void EndDrawNowToRenderTexture ()
End a DrawNowToTexture session
static void ClearRenderTextureNow ( RenderTexture rt, Color clearColor )
Clear a RenderTexture with a color immediately.
static void DrawCircleNow ()
static void DrawCircleNow ( float x, float y, float diameter )
static void DrawCircleNow ( Vector2 position, float diameter )
Draw a circle immediately using Graphics.DrawMeshNow. Call this from OnPostRender or after calling BeginDrawNowToTexture.
static void DrawRingNow ( float x, float y, float innerDiameter, float OuterDiameter )
static void DrawRingNow ( Vector2 position, float innerDiameter, float OuterDiameter )
Draw a ring immediately using Graphics.DrawMeshNow. Call this from OnPostRender or after calling BeginDrawNowToTexture.
static void DrawPieNow ( float x, float y, float diameter, float beginAngle, float deltaAngle, float cutOff, float roundness )
static void DrawPieNow ( Vector2 position, float diameter, float beginAngle, float deltaAngle, float cutOff, float roundness )
Draw a pie immediately using Graphics.DrawMeshNow. Call this from OnPostRender or after calling BeginDrawNowToTexture.
static void DrawArcNow ( float x, float y, float innerDiameter, float outerDiameter, float beginAngle, float deltaAngle, float cutOff, float roundness, bool useGeometricRoundness, bool constrainAngleSpanToRoundness )
static void DrawArcNow ( Vector2 position, float innerDiameter, float outerDiameter, float beginAngle, float deltaAngle, float cutOff, float roundness, bool useGeometricRoundness, bool constrainAngleSpanToRoundness )
Draw a pie immediately using Graphics.DrawMeshNow. Call this from OnPostRender or after calling BeginDrawNowToTexture. Angles in degrees. AngleBegin must be smaller than AngleEnd.
static void DrawRectNow ( float x, float y, float width, float height )
static void DrawRectNow ( float x, float y, float width, float height, float roundness )
static void DrawRectNow ( float x, float y, float width, float height, float lowerLeftRoundness, float upperLeftRoundness, float upperRightRoundness, float lowerRightRoundness )
static void DrawRectNow ( Vector2 position, float width, float height, float lowerLeftRoundness, float upperLeftRoundness, float upperRightRoundness, float lowerRightRoundness )
static void DrawRectNow ( Vector2 position, float width, float height, float roundness )
Draw a rectangle immediately using Graphics.DrawMeshNow. Call this from OnPostRender or after calling BeginDrawNowToTexture.
static void DrawSquareNow ( float x, float y, float size )
static void DrawSquareNow ( float x, float y, float size, float roundness )
static void DrawSquareNow ( float x, float y, float size, float lowerLeftRoundness, float upperLeftRoundness, float upperRightRoundness, float lowerRightRoundness )
static void DrawSquareNow ( Vector2 position, float size, float lowerLeftRoundness, float upperLeftRoundness, float upperRightRoundness, float lowerRightRoundness )
static void DrawSquareNow ( Vector2 position, float size, float roundness )
Draw a square immediately using Graphics.DrawMeshNow. Call this from OnPostRender or after calling BeginDrawNowToTexture.
static void DrawLineNow ( float ax, float ay, float bx, float by )
static void DrawLineNow ( float ax, float ay, float bx, float by, StrokeCap caps )
static void DrawLineNow ( float ax, float ay, float bx, float by, StrokeCap beginCap, StrokeCap endCap )
static void DrawLineNow ( Vector2 positionA, Vector2 positionB, StrokeCap beginCap, StrokeCap endCap )
static void DrawLineNow ( Vector2 positionA, Vector2 positionB, StrokeCap caps )
static void DrawLineNow ( Vector2 positionA, Vector2 positionB )
Draw a line immediately using Graphics.DrawMeshNow. Call this from OnPostRender or after calling BeginDrawNowToTexture.
static void DrawPolygonNow ( Polygon polygon )
Draw a polygon immediately using Graphics.DrawMeshNow. Call this from OnPostRender or after calling BeginDrawNowToTexture.
static void DrawPolylineNow ( Polyline polyline, StrokeCap beginCap, StrokeCap endCap )
static void DrawPolylineNow ( Polyline polyline, StrokeCap caps )
Draw a polygon immediately using Graphics.DrawMeshNow. Call this from OnPostRender or after calling BeginDrawNowToTexture.
static void DrawTextNow ( Text text, float x, float y, float fieldwidth, float fieldHeight, bool drawDebugRect )
static void DrawTextNow ( Text text, Vector2 position, Vector2 fieldSize, bool drawDebugRect )
Draw a text immediately using Graphics.DrawMeshNow. Call this from OnPostRender or after calling BeginDrawNowToTexture.
Polygon SetAsNGon ( float diameter, int sideCount )
Fill this polygon with a N-gon shape.
Polygon SetAsStar ( float innerDiameter, float outerDiameter, int armCount )
Fill this polygon with a star shape.
Polyline SetAsBezierCurve ( Vector2 anchorA, Vector2 controlA, Vector2 controlB, Vector2 anchorB, int resolution )
Fill this polyline with bezier curve points.
void SetContent ( String text )
Set the text content of the Test object.
new JChColor ( float lightness, float chroma, float hueAngle, float alpha )
new JChColor ( Color color )
Create a JChColor.
float lightness
The J dimension, normalised (0.0 to 1.0).
float chroma
The C dimension, normalised (0.0 to 1.0).
float hueAngle
The h dimension, normalised (0.0 to 1.0).
float alpha
The alpha channel, normalised (0.0 to 1.0).
float surroundCondition
Surround condition where 0.0 is a reflected surface (Average), 1.0 an emitting screen (Dim) and 2.0 an emitting video projector in a dark room (Dark). Default is 2.0 (Dim).
float backgroundGraytone
Luminamce factor for background on which the color is viewed, measured in percent gray (0-100). Default is 20, recommended for sRGB.
static JChColor static JChColor white { get; }
Gets a white JChColor.
static JChColor static JChColor black { get; }
Gets a black JChColor.
static JChColor Slerp ( JChColor c1, JChColor c2, float t )
Circular interpolation along the hue angle in the cylendrical JCh color model.
static JChColor Lerp ( JChColor c1, JChColor c2, float t )
Liniear interpolation through the cylendrical JCh color model.
static Color[] LerpCreatePalette ( Color colorA, Color colorB, int stepCount )
Create a palette of colors by linear interpolation through the cylendrical JCh color space.
static Color[] SlerpCreatePalette ( Color colorA, Color colorB, int stepCount )
Create a palette of colors by circular interpolation along the hue angle through the cylendrical JCh color space.
Style holds attributes that are applied when shape instances are submitted for rendering.
bool fillEnabled
Toggle fill visibility state. Default is true.
bool strokeEnabled
Toggle stroke visibility state. Default is true.
Color fillColor
Fill color (the color inside shapes). Default is Color.white.
Color strokeColor
Stroke color (the color of outlines and lines). Default is Color.black.
float strokeWidth
Stroke width (the thickness of outlines and lines). Default is 0.05f.
StrokeAlignment strokeAlignment
Stroke alignment (the alignment of outlines relative to the edge of shapes). Default is StrokeAlignment.Outside.
StrokeCornerProfile strokeCornerProfile
Stroke coner profile (the corner sharpness of Pie, Arch, Rect, Polygon, and Polyline). Default is StrokeCornerProfile.Round.
Pivot pivot
Pivot point (the local zero point on shapes). Default is Pivot.Center.
Vector4 fillTextureUVRect
The UV rect for textures set using SetFillTexture(). Parameters are ( x, y, width, height ). Default is ( 0, 0, 1, 1 ).
Color fillTextureTint
The color tint for textures set using SetFillTexture(). Default is Color.white.
float textSize
The text size in Unity meter units. Default is 0.1f.
TextAlignmentOptions textAlignment
The horizontal and vertical text alignment. Default is TextAlignmentOptions.Center.
TMP_FontAsset textFont
The text font.
int layer
Does not work for DrawNow methods, just like Graphics.DrawMeshNow are not regarding layers. Default is 0, Unity's default layer.
bool antialias
Toggle the antialiasing of shapes. This works independently from Unity's antialiasing. Default is true.
Blend blend
The blend mode. Default is Blend.Transparent.
Texture fillTexture
The texture to be filled inside shapes.
FillTextureBlend fillTextureBlend
The blend of the fill texture onto the fill color. Default is FillTextureBlend.Overlay.
Stroke alignment options.
Inside, Edge, Outside.
Stroke cap options, applied to DrawLine() and DrawPolyline().
None, Square, Round.
Stroke corner profile options.
Hard, Round.
Pivot options.
Center, TopLeft, Top, TopRight, Right, BottomRight, Bottom, BottomLeft, Left.
Shape blending options.
Transparent, TransparentAdditive.
Fill texture onto fill color blend options.
Overlay, Multiply.
Spatial coordinate metrics.
Pixels, Normalized.
Roundness design, used for DrawArc().
Geometric, Organic.