Class: CanvasMing
Source Location: /drawing/CanvasMing.php
TeeBase
|
--CanvasMing
GraphicsGD class
Author(s):
Version:
Copyright:
- (c) 1995-2010 by Steema Software SL. All Rights Reserved. <info@steema.com>
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Class Methods
static method applyDark [line 3485]
static Color applyDark(
c
$c, howMuch
$howMuch)
|
|
Converts the Color parameter to a darker color. The HowMuch parameter indicates the quantity of dark increment. It is used by Bar Series and Pie Series to calculate the right color to draw Bar sides and Pie 3D zones.
Tags:
Parameters:
static method doReflection [line 3489]
static void doReflection(
$im)
|
|
Tags:
Parameters:
static method getDefaultPattern [line 3332]
static HatchStyle getDefaultPattern(
index
$index)
|
|
Returns a valid Windows Brush Style from anpalette of many possible Brush styles.
Tags:
Parameters:
static method getScreenHeight [line 3541]
static int getScreenHeight(
)
|
|
Returns the height, in pixels, of the Chart Panel. It should be used when using Canvas methods to draw relative to the Panel height. Note: You should NOT use TChart.Height.
Tags:
static method getScreenWidth [line 3550]
static int getScreenWidth(
)
|
|
Returns the width, in pixels, of the Chart Panel.
Tags:
static method pointAtDistance [line 3189]
static void pointAtDistance(
$From,
$To,
$distance)
|
|
Tags:
Parameters:
static method pointInEllipse [line 3232]
static boolean pointInEllipse(
p
$p, rect
$rect)
|
|
Returns true if point P is inside the ellipse bounded by Rect.
Tags:
Parameters:
static method pointInHorizTriangle [line 3180]
static boolean pointInHorizTriangle(
p
$p, y0
$y0, y1
$y1, x0
$x0, x1
$x1)
|
|
Returns true if point P is inside the horizontal triangle.
Tags:
Parameters:
static method pointInPolygon [line 3250]
static boolean pointInPolygon(
p
$p, poly
$poly)
|
|
Returns true if point P is inside Poly polygon.
Tags:
Parameters:
static method pointInRect [line 3148]
static boolean pointInRect(
rect
$rect, x
$x, y
$y)
|
|
Obsolete. Please use Rectangle.<!-- -->Contains method.
Tags:
Parameters:
static method pointInTriangle [line 3163]
static boolean pointInTriangle(
p
$p, x0
$x0, x1
$x1, y0
$y0, y1
$y1)
|
|
Returns true if point P is inside the vert triangle of x0y0, midxY1, x1y0.
Tags:
Parameters:
static method rectCenter [line 3413]
static void rectCenter(
$r)
|
|
Tags:
Parameters:
static method _pointInEllipse [line 3221]
static boolean _pointInEllipse(
p
$p, left
$left, top
$top, right
$right, bottom
$bottom)
|
|
Returns true if point P is inside the ellipse bounded by Left, Top, Right, Bottom.
Tags:
Parameters:
constructor CanvasMing [line 107]
CanvasMing CanvasMing(
IBaseChart
$c, integer
$width, integer
$height)
|
|
Creates a new Graphics object
Tags:
Parameters:
method arc [line 2582]
void arc(
$x1,
$y1,
$x2,
$y2,
$startAngle,
$sweepAngle, [
$filled = 0])
|
|
Tags:
Parameters:
method arrow [line 216]
void arrow(
filled
$filled, fromPoint
$fromPoint, toPoint
$toPoint, headWidth
$headWidth, headHeight
$headHeight, z
$z)
|
|
Draws a line with an arrow head of ArrowWidth and ArrowHeight dimensions in pixels.
Tags:
Parameters:
method calc3DPoint [line 450]
void calc3DPoint(
$x,
$y, [
$z = 0])
|
|
Tags:
Parameters:
method calc3DPos [line 348]
Point calc3DPos(
x
$x, y
$y, z
$z)
|
|
Calculates and returns the XY position in pixels of the XYZ 3D coordinate. Can be used when custom drawing using 3D XYZ coordinates are returned from the axes or not.
Tags:
Parameters:
method calc3DPosDouble [line 382]
void calc3DPosDouble(
$x,
$y,
$z,
$pointDouble)
|
|
Calculates and returns the XY position as double of the XYZ 3D coordinate. Can be used when custom drawing using 3D XYZ coordinates are returned from the axes or not. Returns PointDouble
Tags:
Parameters:
method calcPerspective [line 454]
void calcPerspective(
$r)
|
|
Tags:
Parameters:
method calcTrigValues [line 469]
method changed [line 501]
method clipCube [line 989]
void clipCube(
rect
$rect, minZ
$minZ, maxZ
$maxZ)
|
|
Creates a cubic Windows GDI clipping region.
Tags:
Parameters:
method clipPolygon [line 566]
void clipPolygon(
polygonPoints
$polygonPoints)
|
|
Creates a Windows GDI clipping region and selects it into TChart.<!-- -->Canvas device context handle.
Tags:
Parameters:
method clipRectangle [line 533]
void clipRectangle(
left
$left, top
$top, right
$right, bottom
$bottom)
|
|
Creates a Windows GDI clipping region and selects it into TChart.<!-- -->Canvas device context handle.
Tags:
Parameters:
method cone [line 588]
void cone(
vertical
$vertical, r
$r, z0
$z0, z1
$z1, darkSides
$darkSides, [conePercent
$conePercent = 0])
|
|
Paints a cone with Cone Percent. Use ONLY with OPENGL</b>. This parameter varies the apex size as a percentage of the base.
Tags:
Parameters:
method convexHull [line 2777]
Calculates the boundary points of the convex hull of a set of 2D xy points. Original
Tags:
Parameters:
method createImage [line 1029]
Creates and initialize the image
Tags:
method cube [line 901]
void cube(
left
$left, top
$top, right
$right, bottom
$bottom, z0
$z0, z1
$z1, darkSides
$darkSides)
|
|
Draws a Cube with Dark Sides.
Tags:
Parameters:
method cuber [line 886]
void cuber(
$rect,
$z0,
$z1,
$darkSides)
|
|
Tags:
Parameters:
method cylinder [line 601]
void cylinder(
vertical
$vertical, r
$r, z0
$z0, z1
$z1, darkSides
$darkSides)
|
|
Draws cylinder toggle Boolean for vertical or horizontal cylinder.
Tags:
Parameters:
method doRev [line 1127]
method draw [line 157]
void draw(
r
$r, image
$image, mode
$mode, transparent
$shapeBorders,
$transparent)
|
|
Paints the image in rectangle r.
Tags:
Parameters:
method drawBeziers [line 292]
Draws Bezier splines for the Point array p
Tags:
Parameters:
method drawBeziersRect [line 283]
void drawBeziersRect(
z
$z, p
$p)
|
|
Draws Bezier splines for the Point array p at displacement z
Tags:
Parameters:
method drawRoundedBorders [line 2470]
void drawRoundedBorders(
$shapeBorders,
$backcolor,
$forecolor)
|
|
Parameters:
method ellipse [line 1178]
void ellipse(
x1
$x1, y1
$y1, x2
$x2, y2
$y2, [z
$z = 0], [angle
$angle = 0])
|
|
Ellipse bounding Rect (X1,Y1,X2,Y2) at Z position at angle.
Tags:
Parameters:
method ellipsePoints [line 1286]
void ellipsePoints(
$p0,
$p1)
|
|
Tags:
Parameters:
method ellipseRect [line 1142]
Draws an Ellipse bounding Rectangle r.
Tags:
Parameters:
method ellipseRectZ [line 1152]
void ellipseRectZ(
r
$r, z
$z)
|
|
Ellipse bounding Rectangle r at z depth.
Tags:
Parameters:
method ellipseRectZAngle [line 1297]
void ellipseRectZAngle(
r
$r, z
$z, [angle
$angle = 0])
|
|
Ellipse bounding rectangle r with Z offset at angle.
Tags:
Parameters:
method fontTextHeight [line 1309]
int fontTextHeight(
f
$f)
|
|
Determines the Font Height to be used for outputted text when using the Drawing.
Tags:
Parameters:
method getBackColor [line 1852]
Sets / returns the color used to fill spaces when displaying text or filling with brushes of different style other than bsSolid. Brush.Visible must be set to true.
Tags:
method getBrush [line 2927]
Determines the kind of brush used to fill the Canvas draw rectangle background. The Brush.Visible method must be set to true.
Tags:
method getColorPaletteLength [line 2977]
void getColorPaletteLength(
)
|
|
Tags:
method getDefaultColor [line 2954]
Color getDefaultColor(
index
$index)
|
|
Returns a color from global ColorPalette array variable.
Tags:
Parameters:
method getDirty [line 2981]
method getFont [line 2992]
Determines the Font for outputted text when using the Drawing Canvas.
Tags:
method getFontHeight [line 3010]
Defines the Height of the Font in pixels.
Tags:
method getImageInterlace [line 3455]
void getImageInterlace(
)
|
|
Tags:
method getImageReflection [line 3465]
void getImageReflection(
)
|
|
Tags:
method getImg [line 140]
method getIZoomfactor [line 3269]
method getMetafiling [line 3018]
method getMonochrome [line 3026]
method getPen [line 3056]
Indicates the kind of pen used to draw Canvas lines.
Tags:
method getRotationCenter [line 3103]
Sets the Pixel location (using X,Y,Z) of the centre of rotation for use with the Aspect Rotation and Elevation properties.
Tags:
method getSmoothingMode [line 3369]
boolean getSmoothingMode(
)
|
|
The anti-alias mode for the Graphics Pen when Custom drawing. For example: AntiAlias - Specifies antialiased rendering. Default - Specifies the default mode. HighQuality - Specifies high quality, low speed rendering. HighSpeed - Specifies high speed, low quality rendering. Invalid - Specifies an invalid mode.
Tags:
method getSupports3DText [line 3399]
boolean getSupports3DText(
)
|
|
Returns if Canvas supports 3D Text or not.
Tags:
method getSupportsFullRotation [line 3408]
boolean getSupportsFullRotation(
)
|
|
Returns if Canvas can do rotation and elevation of more than 90 degree.
Tags:
method getTextAlign [line 3038]
void getTextAlign(
value
0)
|
|
Gets / Sets the alignment used when displaying text using TextOut or TextOut3D. Default value: Near
Tags:
Parameters:
method getXCenter [line 3285]
The X coordinate of the pixel location of the center of the 3D Canvas. The origin of the pixel coordinate system is in the top left corner of the parent window.
Tags:
method getYCenter [line 3309]
The Y coordinate of the pixel location of the center of the 3D Canvas. The origin of the pixel coordinate system is in the top left corner of the parent window.
Tags:
method horizontalLine [line 1616]
void horizontalLine(
left
$left, right
$right, y
$y, [z
$z = 0])
|
|
Draws a Horizontal at z depth position.
Tags:
Parameters:
method imagegradientellipse [line 761]
void imagegradientellipse(
$image,
$cx,
$cy,
$w,
$h,
$ic,
$oc)
|
|
Parameters:
method imagegradientellipsealpha [line 792]
void imagegradientellipsealpha(
$image,
$cx,
$cy,
$w,
$h,
$ic,
$oc)
|
|
Parameters:
method initWindow [line 1313]
void initWindow(
$a,
$r,
$maxDepth)
|
|
Tags:
Parameters:
method internalApplyDark [line 1341]
void internalApplyDark(
$c,
$quantity)
|
|
Tags:
Parameters:
method line [line 1357]
void line(
integer
$x1, integer
$y1, integer
$x2, integer
$y2, [Color
$color = null], [integer
$width = -1])
|
|
Draws a straight line
Tags:
Parameters:
method lineTo [line 1472]
Draws a line to Point with z depth offset.
Tags:
Parameters:
method moveTo [line 1536]
Sets the value of PenPos to Point p before calling LineTo.
Tags:
Parameters:
method moveTo3D [line 1570]
Sets the value of PenPos to 3D Point p before calling LineTo.
Tags:
Parameters:
method moveToXY [line 1526]
void moveToXY(
x
$x, y
$y)
|
|
Sets the value of PenPos to x and y co-ordinates before calling LineTo.
Tags:
Parameters:
method moveToXYZ [line 1548]
void moveToXYZ(
x
$x, y
$y, z
$z)
|
|
Sets the value of PenPos to x, y and z co-ordinates before calling LineTo.
Tags:
Parameters:
method moveToZ [line 1560]
void moveToZ(
p
$p, z
$z)
|
|
Sets the value of PenPos to Point p with z depth offset before calling LineTo.
Tags:
Parameters:
method outlinedBox [line 1666]
void outlinedBox(
integer
$x1, integer
$y1, integer
$x2, integer
$y2, Color
$color0, Color
$color1)
|
|
Draw a filled gray box with thick borders and darker corners.
Tags:
Parameters:
method paintBevel [line 1698]
void paintBevel(
$bevel,
$rect,
$width,
$one,
$two)
|
|
Tags:
Parameters:
method pie [line 1742]
void pie(
xCenter
$xCenter, yCenter
$yCenter, xRadius
$xOffset, yRadius
$yOffset, z0
$xRadius, z1
$yRadius, startAngle
$z0, endAngle
$z1, darkSides
$startAngle, drawSides
$endAngle, donutPercent
$darkSides,
$drawSides,
$donutPercent,
$bevelPercent,
$edgeStyle,
$last)
|
|
Draws a 3D Pie slice using start Angle and end Angle and donut percent.
Tags:
Parameters:
method plane [line 1888]
void plane(
p1
$p1, p2
$p2, z0
$z0, z1
$z1)
|
|
Draws a polygon (Point p1, Point p2) at Z depth offset.
Tags:
Parameters:
method planeFour3D [line 1921]
void planeFour3D(
z0
$z0, z1
$z1, p
$p)
|
|
Draws a polygon of four points.
Tags:
Parameters:
method pointFromCircle [line 3421]
void pointFromCircle(
$rectBounds,
$degrees,
$zPos, [
$clockWise = false])
|
|
Tags:
Parameters:
method polygon [line 1929]
method polygonFourDouble [line 2021]
void polygonFourDouble(
)
|
|
Tags:
method polygonPoints [line 2015]
void polygonPoints(
$p0,
$p1,
$p2)
|
|
Tags:
Parameters:
method polygonZ [line 2008]
void polygonZ(
z
$z, p
$p)
|
|
Draws a polygon with z position offset.
Tags:
Parameters:
method polyLine [line 2123]
void polyLine(
z
$z, p
$p)
|
|
Draws a series of line segments to join point array p at z displacement.
Tags:
Parameters:
method printCentered [line 2214]
void printCentered(
Image
$img, integer
$py, Color
$color, string
$text, string
$fontFileName)
|
|
Print text centered horizontally on the image.
Tags:
Parameters:
method printDiagonal [line 2229]
void printDiagonal(
Image
$img, integer
$px, integer
$py, Color
$text, string
$angle)
|
|
Print text in diagonal.
Tags:
Parameters:
method printText [line 2146]
void printText(
Image
$img, integer
$px, integer
$py, Color
$text, [string
$align = -1], string
5, bitfield
6)
|
|
Print text.
Tags:
Parameters:
method projection [line 2254]
void projection(
maxDepth
$maxDepth, r
$r)
|
|
Internal use. Calculates the projection co-ordinates for rectangle Bounds.
Tags:
Parameters:
method pyramid [line 1782]
void pyramid(
vertical
$vertical, left
$left, top
$top, right
$right, bottom
$bottom, z0
$z0, z1
$z1, darkSides
$darkSides)
|
|
Draws a vertical or horizontal Pyramid with optional dark shaded sides.
Tags:
Parameters:
method pyramidRect [line 1765]
void pyramidRect(
vertical
$vertical, r
$r, z0
$z0, z1
$z1, darkSides
$darkSides)
|
|
Draws a vertical or horizontal Pyramid with optional dark shaded sides.
Tags:
Parameters:
method pyramidTrunc [line 1870]
void pyramidTrunc(
Rectangle
$r, int
$startZ, int
$endZ, int
$truncX, int
$truncZ)
|
|
Draws a pyramid with a truncated apex of variable thickness.
Tags:
Parameters:
method rectangle [line 2264]
void rectangle(
$rect, [
$animations = null])
|
|
Tags:
Parameters:
method rectangleWithZ [line 2410]
void rectangleWithZ(
$r,
$z)
|
|
Tags:
Parameters:
method rectangleY [line 2428]
void rectangleY(
left
$left, top
$top, right
$right, z0
$z0, z1
$z1)
|
|
Horizontal Rectangle from Left to Right, from Z0 to Z1 position, at Top Y.
Tags:
Parameters:
method rectangleZ [line 2402]
void rectangleZ(
left
$left, top
$top, bottom
$bottom, z0
$z0, z1
$z1)
|
|
Horizontal Rectangle from Left to Right, from Z0 to Z1 position, at Top Y.
Tags:
Parameters:
method rectFromPolygon [line 3115]
Returns the bounding rectangle for a given array of XY points.
Tags:
Parameters:
method rotateLabel [line 2622]
void rotateLabel(
x
$x, y
$y, z
$z, text
$text, rotDegree
$rotDegree)
|
|
Draws a rotated text String at the specified x,y and z coordinates with the RotDegree rotation angle. RotDegree values must be between 0 and 360. The string is drawn on the Chart Drawing Canvas.
Tags:
Parameters:
method rotateRectangle [line 2641]
void rotateRectangle(
$r,
$angle)
|
|
Tags:
Parameters:
method roundrectangle [line 2439]
void roundrectangle(
$x1,
$y1,
$x2,
$y2,
$radius, [
$filled = 1])
|
|
Parameters:
method setBackColor [line 1856]
void setBackColor(
$value)
|
|
Tags:
Parameters:
method setBrush [line 2941]
void setBrush(
value
$value)
|
|
Determines the kind of brush used to fill the Canvas draw rectangle background. The Brush.Visible method must be set to true.
Tags:
Parameters:
method setColorPalette [line 2963]
void setColorPalette(
palette
$palette)
|
|
Specifies a color from global ColorPalette array variable.
Tags:
Parameters:
method setDirty [line 2985]
method setFont [line 3001]
void setFont(
value
$value)
|
|
Determines the Font for outputted text when using the Drawing Canvas.
Tags:
Parameters:
method setGraphics [line 3014]
void setGraphics(
$value)
|
|
Tags:
Parameters:
method setImageInterlace [line 3460]
void setImageInterlace(
$vlaue)
|
|
Tags:
Parameters:
method setImageReflection [line 3470]
void setImageReflection(
$value)
|
|
Tags:
Parameters:
method setIZoomfactor [line 3273]
void setIZoomfactor(
$value)
|
|
Tags:
Parameters:
method setMetafiling [line 3022]
void setMetafiling(
$value)
|
|
Tags:
Parameters:
method setPen [line 3065]
void setPen(
value
$value)
|
|
Determines the kind of pen used to draw Canvas lines.
Tags:
Parameters:
method setSmoothingMode [line 3386]
void setSmoothingMode(
value
$value)
|
|
Sets the anti-alias mode for the Graphics Pen when Custom drawing. For example: AntiAlias - Specifies antialiased rendering. Default - Specifies the default mode. HighQuality - Specifies high quality, low speed rendering. HighSpeed - Specifies high speed, low quality rendering. Invalid - Specifies an invalid mode.
Tags:
Parameters:
method setTextAlign [line 3042]
void setTextAlign(
$value)
|
|
Tags:
Parameters:
method setXCenter [line 3297]
void setXCenter(
value
$value)
|
|
Specifies the X coordinate of the pixel location of the center of the 3D Canvas. The origin of the pixel coordinate system is in the top left corner of the parent window.
Tags:
Parameters:
method setYCenter [line 3321]
void setYCenter(
value
$value)
|
|
Specifies the Y coordinate of the pixel location of the center of the 3D Canvas. The origin of the pixel coordinate system is in the top left corner of the parent window.
Tags:
Parameters:
method sliceArray [line 2674]
void sliceArray(
$source,
$length)
|
|
Tags:
Parameters:
method textHeight [line 2766]
int textHeight(
text
$text)
|
|
Returns the vertical size in pixels of the text String.
Tags:
Parameters:
method textOut [line 2695]
void textOut(
x
$x, y
$y, z
$z, text
$text, [
$align = -1])
|
|
Displays the 2D non-rotated label at the specified X Y screen coordinates. Text is outputted to the correct internal drawing Graphics2D. The X and Y coordinates must be valid and fit inside the Chart rectangle. It uses the current drawing Font attributes. Writes text at the named x and y co-ordinates.
Tags:
Parameters:
method textWidth [line 2746]
int textWidth(
f
$text, [text
$f = null])
|
|
Returns the horizontal text size in pixels of ChartFont f.
Tags:
Parameters:
method transparentEllipsePoints [line 1163]
void transparentEllipsePoints(
$p0,
$p1)
|
|
Tags:
Parameters:
method transparentEllipseZ [line 1157]
void transparentEllipseZ(
$x1,
$y1,
$x2,
$y2,
$z)
|
|
Tags:
Parameters:
method triangle [line 2575]
void triangle(
p0
$p0, p1
$p1, p2
$p2, [z
$z = 0])
|
|
Draws a triangle (point p0, pointp1, pointp2) at Z position.
Tags:
Parameters:
method unClip [line 503]
method verticalLine [line 1640]
void verticalLine(
x
$x, top
$top, bottom
$bottom, [z
$z = 0])
|
|
Draws a Vertical Line from (X,Top) to (X,Bottom) at z depth position.
Tags:
Parameters:
method zLine [line 1582]
void zLine(
x
$x, y
$y, z0
$z0, z1
$z1)
|
|
Draws a Line from (X,Y,Z0) to (X,Y,Z1).
Tags:
Parameters:
method _calc3DPos [line 419]
Point _calc3DPos(
source
$source)
|
|
Calculates and returns the XY position in pixels of the point p Z 3D coordinate. Can be used when custom drawing using 3D XYZ coordinates are returned from the axes or not.
Tags:
Parameters:
method _line [line 1418]
void _line(
x0
$x0, y0
$y0, x1
$x1, y1
$y1, [z
$z = 0])
|
|
Draws a Line between co-ordinates with z depth offset.
Tags:
Parameters:
method _plane [line 1906]
void _plane(
p1
$p1, p2
$p2, p3
$p3, p4
$p4, z
$z)
|
|
Draws a polygon (Point p1, Point p2, Point p3, Point p4) at Z depth offset.
Tags:
Parameters:
method _rectangle [line 2388]
void _rectangle(
$x,
$y,
$width,
$height)
|
|
Tags:
Parameters:
method _rotateLabel [line 2637]
void _rotateLabel(
p
$p, text
$text, rotDegree
$rotDegree)
|
|
Draws a rotated text String at the specified Point x,y coordinates with the RotDegree rotation angle. RotDegree values must be between 0 and 360. The string is drawn on the Chart Drawing Canvas.
Tags:
Parameters:
method _textHeight [line 2735]
int _textHeight(
f
$f, text
$text)
|
|
Returns the vertical text size in pixels of ChartFont f.
Tags:
Parameters:
method __calc3DPos [line 433]
Point __calc3DPos(
source
$source, z
$z)
|
|
Calculates and returns the XY position in pixels of the point p Z 3D coordinate. Can be used when custom drawing using 3D XYZ coordinates are returned from the axes or not.
Tags:
Parameters:
method __get [line 85]
method __line [line 1428]
void __line(
p0
$p0, p1
$p1)
|
|
Draws a Line between point p0 and point p1.
Tags:
Parameters:
method __lineTo [line 1481]
Draws a line to Point with z = 0 depth offset.
Tags:
Parameters:
method __set [line 92]
void __set(
$property,
$value)
|
|
Overrides TeeBase::__set() (parent method not documented)
Parameters:
method ___calc3DPos [line 446]
Point ___calc3DPos(
source
$source)
|
|
Calculates and returns the XY position in pixels of the point p with Z = 0 3D coordinate. Can be used when custom drawing using 3D XYZ coordinates are returned from the axes or not.
Tags:
Parameters:
method ___line [line 1441]
void ___line(
pen
$pen, p0
$p0, p1
$p1)
|
|
Draws a Line between point p0 and point p1 using specific pen.
Tags:
Parameters:
method ___lineTo [line 1495]
void ___lineTo(
x
$x, y
$y, [z
$z = 0])
|
|
Draws line from present position to end co-ordinates with z depth offset.
Tags:
Parameters:
method ____lineTo [line 1504]
Draws a Line to 3D Point.
Tags:
Parameters:
method _____lineTo [line 1514]
void _____lineTo(
x
$x, y
$y)
|
|
Draws line from present position to end co-ordinates with z depth offset.
Tags:
Parameters:
|
|