Download MetaTrader 5

Libraries: cIntBMP - a library for creation of BMP images

To add comments, please log in or register
MetaQuotes Software Corp.
Moderator
185241
MetaQuotes Software Corp.  

cIntBMP - a library for creation of BMP images:

A class for creation and output of BMP images.

Class Methods:

  • Create(int aSizeX, int aSizeY, int aBGColor) - Sets image size and background color.
    aSizeX - width (in pixels);
    aSizeY - height (in pixels);
    aBGColor - background color;
  • SetDrawWidth(int aWidth) - Sets pen width.
    aWidth - pen width.
  • DrawDot(int aX, int aY, int aColor) - Draws a dot.
    aX - X coordinate;
    aY - Y cooordinate;
    aColor - color;
  • DrawLine(int aX1,int aY1, int aX2, int aY2, int aColor) - Draws a line.
    aX1, aY1 - starting coordinates;
    aX2, aY2 - ending coordinates;
    aColor - color;
  • DrawRectangle(int aX1, int aY1, int aX2, int aY2, int aColor, bool aSolid=false) - Draws a rectangle.
    aX1, aY1 - coordinates of the upper left corner;
    aX2, aY2 - coordinates of the lower right corner;
    aColor - color;
    aSolid - true - filled.
  • DrawTriangle(int aX1, int aY1, int aX2, int aY2, int aX3, int aY3, int aColor, bool aSolid=false) - Draws a triangle.
    aX1, aY1, aX2, aY2, aX3, aY3 - edge coordinates;
    aColor - color;
    aSolid - true - filled.
  • DrawCircle(int aX, int aY, int aRadius1, int aRadius2, int aColor, double aRatio=1.0, double aAngleFrom=0.0, double aAngleTo, bool aSolid=false) - Draws a circle.
    aX - X coordinate;
    aY - Y coordinate;
    aRadius1 - radius of the 1st circle;
    aRadius2 - radius of the 2nd circle;
    aColor - color;
    aRatio - ratio (ratio=1, circle, overwise ellipse).
    aAngleFrom - starting angle;
    aAngleTo - ending angle. if aAngleFrom=aAngleTo, it will draw a circle;
    aSolid - true - filled circle/ellipse.
  • Fill(int aX, int aY, int aColor) - Fills the area.
    aX, aY - coordinates of the fill area;
    aColor - fill color.
  • TypeText(int aX, int aY, int aColor) - Prints text on the image.
    aX, aY - coordinates of the left upper corner of the text;
    aColor - text color.
  • Save(string aFileName, bool aToImages=true) - saves the created image to file.
    aFileName - File name (it isn't necessary to specify the extension) ;
    aToImages - file will be saved to the MQL5\Images\ folder, overwise it will be saved to the MQL5\Files\ folder.
  • Show(int aX, int aY, string aBMPFileName, string aObjectName) - Shows the image on the chart.
    aX, aY - coodinates;
    aBMPFileName - file name of the image;
    aObjectName - graphic object of OBJ_BITMAP_LABEL type.
  • Hide(string aObjectName) - Deletes graphic object with the specified name.
    aObjectName - name of the object to delete.
  • Delete(string aFileName, bool aFromImages=true) - Deletes a file.
    aFileName - Name of the bmp file to delete (without path, it isn't necessary to specify the extension);
    aFromImages - if true, the file will be deleted from MQL5\Images\ folder, overwise it will be deleted from MQL5\Files\ folder.

Author: Дмитрий

An example of DrawTriangle() method of cIntBMP class

An example of DrawTriangle() method

An example of DrawRectangle() method of cIntBMP class

An example of DrawRectangle() method

An example of DrawCircle() method of cIntBMP class

An example of DrawCircle() method

An example of Fill() method of cIntBMP class

An example of Fill() method

barnix
20
barnix  
On Windows 7 64 bit don't work.
Automated-Trading
Admin
104191
Automated-Trading  
barnix:
On Windows 7 64 bit don't work.
Fixed. Please download it again.
Forexator
79
Forexator  
Is there any possibility to use this library WITHOUT the dll it calls? (file functions inside the code)
To add comments, please log in or register