Skip to content

CCanvas

CCanvas

CCanvas is a class for simplified creation of custom images.

Description

CCanvas provides creation of a graphical resource (with or without binding to a chart object) and drawing graphic primitives.

Declaration

class CCanvas

Title

#include <Canvas\Canvas.mqh>

Inheritance hierarchy

CCanvas

Direct descendants

: CChartCanvas, CFlameCanvas

Class methods by groups

Creating
AttachAttaches the OBJ_BITMAP_LABEL object to an instance of the CCanvas class
CreateCreates a graphical resource without binding to a chart object
CreateBitmapCreate a graphical resource bound to a chart object
CreateBitmapLabelCreate a graphical resource bound to a chart object
DestroyDestroys a graphical resource
Properties
ChartObjectNameGets the name of a bound chart object
ResourceNameGets the name of a graphical resource
WidthGets the width of a graphical resource
HeightGets the height of a graphical resource
LineStyleSetSets the line style
Updates an object on the screen
UpdateDisplays changes on the screen
ResizeResizes a graphical resource
Erasing/Filling with color
EraseErases or fills with the specified color
Data access
PixelGetGets a color of the dot with the specified coordinates
PixelSetSets color of the dot with the specified coordinates
Draws primitives
LineVerticalDraws a vertical line
LineHorizontalDraws a horizontal line
LineDraws a freehand line
PolylineDraws a polyline
PolygonDraws a polygon
RectangleDraws a rectangle
CircleDraws a circle
TriangleDraws a triangle
EllipseDraws an ellipse
ArcDraws an ellipse arc
PieDraws an ellipse sector
Draws filled primitives
FillRectangleDraws a filled rectangle
FillCircleDraws a filled circle
FillTriangleDraws a filled triangle
FillPolygonDraws a filled polygon
FillEllipseDraws a filled ellipse
FillFills an area
Draws primitives with antialiasing
PixelSetAADraws a pixel
LineAADraws a line
PolylineAADraws a polyline
PolygonAADraws a polygon
TriangleAADraws a triangle
CircleAADraws a circle
EllipseAADraws an ellipse
LineWuDraws a line
PolylineWuDraws a polyline
PolygonWuDraws a polygon
TriangleWuDraws a triangle
CircleWuDraws a circle
EllipseWuDraws an ellipse
LineThickDraws a segment of a freehand line having a specified width using antialiasing algorithm.
LineThickVerticalDraws a vertical segment of a freehand line having a specified width using antialiasing algorithm.
LineThickHorizontalDraws a horizontal segment of a freehand line having a specified width using antialiasing algorithm.
PolygonSmoothDraws a polygon with a specified width using two antialiasing algorithms
PolygonThickDraws a polygon with a specified width using antialiasing algorithm
PolylineSmoothDraws a polyline with a specified width using two antialiasing algorithms
PolylineThickDraws a polyline with a specified width using antialiasing algorithm
Text
FontSetSets font parameters
FontNameSetSets font name
FontSizeSetSets font size
FontFlagsSetSets font flags
FontAngleSetSets font slope angle
FontGetGets font parameters
FontNameGetGets font name
FontSizeGetGets font size
FontFlagsGetGets font flags
FontAngleGetGets font slope angle
TextOutDisplays text
TextWidthGets the text width
TextHeightGets the text height
TextSizeGets the text size
Transparency
TransparentLevelSetSets transparency level
Input/output
LoadFromFileReads an image from a BMP file
Last updated on