I have been trying to convert a unit I had, from VCL to FMX. One of the librarys I use is VCL.Graphics
for TpenStyle
:
wallstyle,pathstyle,solvedpathstyle:TPenStyle;
How can I convert this to be able to use in Firemonkey?
Start with the documentation for FMX.Types.TCanvas. Note that it says:
... Specifying the type of brush, stroke, and font to use.
We recognise brush and font from VCL times, but what about stroke?
Click on the Properties link at the top of the documentation link I gave above. Notice the various properties that have stroke in their name: Stroke, StrokeCap, StrokeDash, StrokeJoin, StrokeThickness.
Also take a look at the methods by clicking on the Methods link of the TCanvas documentation page. There you will find, amongst many others: DrawRect and FillRect. The documentation for these methods tell you which properties influence the output. For DrawRect, the outline is determined by Stroke, StrokeDash etc. For FillRect, the fill is determined by the Fill property.
So, to answer your question you need to specify a value for StrokeDash. More generally, the equivalent to the VCL Pen property are the Stroke properties. And the equivalent to the VCL Brush property is Fill.
I hope I've also given you some clues as to how to navigate the documentation to find out the answers to such questions for yourself.