I'm a newbie when it comes to graphics in Lazarus. I'm much more of a back-end type of coder.
I've been toying with the canvas_test example project (accessible from Tools -> Example Projects and in the unit
RectangleTest, around line 69, you'll find:
// Different rectangles
MyBitmap.Canvas.Brush.Color := clRed;
MyBitmap.Canvas.Pen.Color := clBlack;
MyBitmap.Canvas.DrawFocusRect(Bounds(25, 75, 50, 50));
I wondered how to change the color of the rectangle produced by
DrawFocusedRect. Changing the color of the pen and/or the brush has no effect. Am I missing something, or is DrawFocusRect purpose is to draw a black rectangle?
By the way, I tried to approximate that effect using the following modified code from line 72 in the same unit
//I've added the following two lines
MyBitmap.Canvas.Pen.Color = clBlue;
MyBitmap.Canvas.Pen.Style = psDot;
MyBitmap.Canvas.Rectangle(Bounds(325, 75, 50, 50));
That bit of code works but the 'dot' style is coarser than the one produced by DrawFocusRect. Is there a way to approximate that style using Draw?
Thanks!