mxGraph
Public Member Functions | Properties | List of all members
com.mxgraph.mxICanvas2D Interface Reference

Defines the requirements for a canvas that paints the vertices and edges of a graph. More...

Inheritance diagram for com.mxgraph.mxICanvas2D:
com.mxgraph.mxGdiCanvas2D

Public Member Functions

void Save ()
 Saves the current state of the canvas. More...
 
void Restore ()
 Restores the previous state of the canvas. More...
 
void Scale (double value)
 Uniformaly scales the canvas by the given amount. More...
 
void Translate (double dx, double dy)
 Translates the canvas by the given amount. More...
 
void Rotate (double theta, bool flipH, bool flipV, double cx, double cy)
 Rotates the canvas by the given angle around the given center. This method may add rendering overhead and should be used with care. More...
 
void SetGradient (string color1, string color2, double x, double y, double w, double h, string direction, double alpha1, double alpha2)
 Prepares the canvas to draw a gradient. More...
 
void SetShadowOffset (double dx, double dy)
 Prepares the canvas to draw a gradient. More...
 
void Rect (double x, double y, double w, double h)
 Next fill or stroke should draw a rectangle. More...
 
void Roundrect (double x, double y, double w, double h, double dx, double dy)
 Next fill or stroke should draw a round rectangle. More...
 
void Ellipse (double x, double y, double w, double h)
 Next fill or stroke should draw an ellipse. More...
 
void Image (double x, double y, double w, double h, string src, bool aspect, bool flipH, bool flipV)
 Draws the given image. More...
 
void Text (double x, double y, double w, double h, string str, string align, string valign, bool wrap, string format, string overflow, bool clip, double rotation)
 Draws the given string. Possible values for format are empty string for More...
 
void Begin ()
 Begins a new path. More...
 
void MoveTo (double x, double y)
 Moves to the given path. More...
 
void LineTo (double x, double y)
 Draws a line to the given path. More...
 
void QuadTo (double x1, double y1, double x2, double y2)
 Draws a quadratic curve to the given point. More...
 
void CurveTo (double x1, double y1, double x2, double y2, double x3, double y3)
 Draws a bezier curve to the given point. More...
 
void Close ()
 Closes the current path. More...
 
void Stroke ()
 Paints the outline of the current path. More...
 
void Fill ()
 Fills the current path. More...
 
void FillAndStroke ()
 Fills and paints the outline of the current path. More...
 

Properties

double StrokeWidth [set]
 Sets the stroke width. This should default to 1 if unset. More...
 
string StrokeColor [set]
 Sets the stroke color. This should default to mxConstants.NONE if unset. More...
 
bool Dashed [set]
 Sets the dashed state. This should default to false if unset. More...
 
string DashPattern [set]
 Sets the dash pattern. This should default to "3 3" if unset. More...
 
string LineCap [set]
 Sets the linecap. This should default to "flat" if unset. More...
 
string LineJoin [set]
 Sets the linejoin. This should default to "miter" if unset. More...
 
double MiterLimit [set]
 Sets the miterlimit. This should default to 10 if unset. More...
 
double FontSize [set]
 Default value mxConstants.DEFAULT_FONTSIZE. More...
 
string FontColor [set]
 Default value "#000000". More...
 
string FontFamily [set]
 Default value mxConstants#DEFAULT_FONTFAMILY. More...
 
int FontStyle [set]
 Default value 0. See mxConstants#STYLE_FONTSTYLE. More...
 
string FontBackgroundColor [set]
 Default value 0. See mxConstants#STYLE_FONTSTYLE. More...
 
string FontBorderColor [set]
 Default value 0. See mxConstants#STYLE_FONTSTYLE. More...
 
double Alpha [set]
 Default value 1. This method may add rendering overhead and should be used with care. More...
 
string FillColor [set]
 Default value mxConstants#NONE. More...
 
bool Shadow [set]
 Default value mxConstants#NONE. More...
 
string ShadowColor [set]
 Default value mxConstants#NONE. More...
 
double ShadowAlpha [set]
 Default value 1. This method may add rendering overhead and should be used with care. More...
 

Detailed Description

Defines the requirements for a canvas that paints the vertices and edges of a graph.

Member Function Documentation

void com.mxgraph.mxICanvas2D.Begin ( )

Begins a new path.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.Close ( )

Closes the current path.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.CurveTo ( double  x1,
double  y1,
double  x2,
double  y2,
double  x3,
double  y3 
)

Draws a bezier curve to the given point.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.Ellipse ( double  x,
double  y,
double  w,
double  h 
)

Next fill or stroke should draw an ellipse.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.Fill ( )

Fills the current path.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.FillAndStroke ( )

Fills and paints the outline of the current path.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.Image ( double  x,
double  y,
double  w,
double  h,
string  src,
bool  aspect,
bool  flipH,
bool  flipV 
)

Draws the given image.

void com.mxgraph.mxICanvas2D.LineTo ( double  x,
double  y 
)

Draws a line to the given path.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.MoveTo ( double  x,
double  y 
)

Moves to the given path.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.QuadTo ( double  x1,
double  y1,
double  x2,
double  y2 
)

Draws a quadratic curve to the given point.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.Rect ( double  x,
double  y,
double  w,
double  h 
)

Next fill or stroke should draw a rectangle.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.Restore ( )

Restores the previous state of the canvas.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.Rotate ( double  theta,
bool  flipH,
bool  flipV,
double  cx,
double  cy 
)

Rotates the canvas by the given angle around the given center. This method may add rendering overhead and should be used with care.

Parameters
thetaRotation angle in degrees (0 - 360).
flipHSpecifies if drawing should be flipped horizontally.
flipVSpecifies if drawing should be flipped vertically.
cxX-coordinate of the center point.
cyY-coordinate of the center point.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.Roundrect ( double  x,
double  y,
double  w,
double  h,
double  dx,
double  dy 
)

Next fill or stroke should draw a round rectangle.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.Save ( )

Saves the current state of the canvas.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.Scale ( double  value)

Uniformaly scales the canvas by the given amount.

Parameters
valueThe new scale value.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.SetGradient ( string  color1,
string  color2,
double  x,
double  y,
double  w,
double  h,
string  direction,
double  alpha1,
double  alpha2 
)

Prepares the canvas to draw a gradient.

void com.mxgraph.mxICanvas2D.SetShadowOffset ( double  dx,
double  dy 
)

Prepares the canvas to draw a gradient.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.Stroke ( )

Paints the outline of the current path.

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.Text ( double  x,
double  y,
double  w,
double  h,
string  str,
string  align,
string  valign,
bool  wrap,
string  format,
string  overflow,
bool  clip,
double  rotation 
)

Draws the given string. Possible values for format are empty string for

Implemented in com.mxgraph.mxGdiCanvas2D.

void com.mxgraph.mxICanvas2D.Translate ( double  dx,
double  dy 
)

Translates the canvas by the given amount.

Parameters
dxX-coordinate of the translation.
dyY-coordinate of the translation.

Implemented in com.mxgraph.mxGdiCanvas2D.

Property Documentation

double com.mxgraph.mxICanvas2D.Alpha
set

Default value 1. This method may add rendering overhead and should be used with care.

bool com.mxgraph.mxICanvas2D.Dashed
set

Sets the dashed state. This should default to false if unset.

string com.mxgraph.mxICanvas2D.DashPattern
set

Sets the dash pattern. This should default to "3 3" if unset.

string com.mxgraph.mxICanvas2D.FillColor
set

Default value mxConstants#NONE.

string com.mxgraph.mxICanvas2D.FontBackgroundColor
set

Default value 0. See mxConstants#STYLE_FONTSTYLE.

string com.mxgraph.mxICanvas2D.FontBorderColor
set

Default value 0. See mxConstants#STYLE_FONTSTYLE.

string com.mxgraph.mxICanvas2D.FontColor
set

Default value "#000000".

string com.mxgraph.mxICanvas2D.FontFamily
set
double com.mxgraph.mxICanvas2D.FontSize
set
int com.mxgraph.mxICanvas2D.FontStyle
set

Default value 0. See mxConstants#STYLE_FONTSTYLE.

string com.mxgraph.mxICanvas2D.LineCap
set

Sets the linecap. This should default to "flat" if unset.

string com.mxgraph.mxICanvas2D.LineJoin
set

Sets the linejoin. This should default to "miter" if unset.

double com.mxgraph.mxICanvas2D.MiterLimit
set

Sets the miterlimit. This should default to 10 if unset.

bool com.mxgraph.mxICanvas2D.Shadow
set

Default value mxConstants#NONE.

double com.mxgraph.mxICanvas2D.ShadowAlpha
set

Default value 1. This method may add rendering overhead and should be used with care.

string com.mxgraph.mxICanvas2D.ShadowColor
set

Default value mxConstants#NONE.

string com.mxgraph.mxICanvas2D.StrokeColor
set

Sets the stroke color. This should default to mxConstants.NONE if unset.

double com.mxgraph.mxICanvas2D.StrokeWidth
set

Sets the stroke width. This should default to 1 if unset.


The documentation for this interface was generated from the following file: