November 2019
Beginner to intermediate
674 pages
15h
English
I have also prepared a more useful example of a simple painting application. As shown in the following image, the Painter project allows you to draw with two tools: one drawing squares and another drawing circles:

The painting tools are implemented in the Painter.Tools unit. As in the first example, they are implemented in a true GoF manner by deriving from the base abstract class. The following code fragment shows tool definitions:
type TPaintStamp = class public procedure Apply(canvas: TCanvas; x, y: integer); virtual; abstract; end; TSquareStamp = class(TPaintStamp) public procedure Apply(canvas: TCanvas; ...
Read now
Unlock full access