Site icon Learn C++

Quickly Learn How To Use Canvas Drawing In C++ On Windows

In C++ Builder, it is easy to draw images on Bitmaps by using Canvas property and methods to draw, Canvas can be used on both VCL and FMX applications. Canvas provides an abstract drawing space for objects that must render their own images. TCanvas provides properties, events, and methods that assist in creating an image by:

In C++ Builder FireMonkey projects, Canvas requires BeginScene() and EndScene() Methods to edit that memory area faster. We can use Canvas property of any component. Here below all samples are about Canvas of Bitmaps. Canvas of Bitmaps can be used to draw inside and all drawings should be done between these methods as below;

General usage of Canvas of a Bitmap
Using Bitmap allows you to modify canvas while you can able to show this as a Image Bitmap, you can also Load or Save this bitmap easily. Please read this article about Bitmap Operations in C++ Builder (FireMonkey).

[crayon-6743b6e4a72f3219956007/]

Colors, Pen and Paper Color in Canvas

[crayon-6743b6e4a72fb273509520/]

Drawing Lines into Canvas

[crayon-6743b6e4a72fc012402642/]

Getting and Drawing Pixels into Canvas

[crayon-6743b6e4a72ff667839354/]

Drawing Rectangles into Canvas

[crayon-6743b6e4a7300948467898/]

Drawing Circles and Ellipses into Canvas

[crayon-6743b6e4a7301712895569/]

Drawing Texts in to Canvas

[crayon-6743b6e4a7302909957106/]

Drawing Bitmap into Canvas of another Bitmap

[crayon-6743b6e4a7303481984472/]

Exit mobile version