-
Notifications
You must be signed in to change notification settings - Fork 1
Z07 Triangle
It should not come as a surprise that I am using triangles as an example more than once.

Try and improve the colors for the dark mode.
Note that I have used TRggColor as the type for the colors. This is mainly because there will be multiple implementations of the documentation drawing code, for different platforms like FMX, VCL and LCL. The colors used to draw to the canvas of the platform are different. I wanted or needed to abstract the sample code from the actual colors used, so that I do not get unnecessary noise when comparing examples.
I need to compare the same examples between platforms. They are not actually the same, but should be comparable, so that I can merge any improvements between them.
I am using a good diff tool to do the diff.
procedure TRggDrawingZ07.GoDark;
begin
inherited;
A.StrokeColor := TRggColors.Tomato;
BC.StrokeColor := TRggColors.Tomato;
B.StrokeColor := TRggColors.Dodgerblue;
AC.StrokeColor := TRggColors.Dodgerblue;
C.StrokeColor := TRggColors.Lime;
AB.StrokeColor := TRggColors.Lime;
T.StrokeColor := TRggColors.Gray;
end;You should be able to use intellisense in the source code editor to select a color.
- Be an artist and improve the colors.
- Show and hide the captions of individual elements.
- Force all captions elements to be shown, even the hidden ones.
You can hide and show captions at runtime. The initial value, whether a caption is initially hidden or visible, can be specified in code.