Recent

Author Topic: TPen line styles  (Read 1538 times)

nsl

  • New Member
  • *
  • Posts: 16
TPen line styles
« on: April 04, 2019, 03:23:34 pm »
This post is to promote bug #0034744  (https://bugs.freepascal.org/view.php?id=34744). I created this report many weeks ago but it has not been adopted yet.

The issue concerns lines drawn on a canvas with a line style (i.e. dotted, dashed etc.) when using macOS with the Carbon or Cocoa widget sets. The Lazarus TPen object attempts to make a MS Windows style interface to the native Core Graphics CGContext. In my view the code to emulate dashes and dotted lines is not optimum. In particular if the ‘round’ line-end style is used dashed/dotted sections run into each other. I have made some small adjustments to the code and generated a patch file.

In addition I have added code to support the MS Windows ‘Cosmetic’ line styles which are used when line width = 1.

Line styles can be tested using the standard lazarus/examples/canvas_test project.


Lazarus 2.1 on Windows 10 / macOS Mojave

 

TinyPortal © 2005-2018