Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom pen mode in delphi

Tags:

delphi

Does anyone know how it is possible to create a new pen mode so that I can use it in this way: shape1.pen.mode:=pmCustom; Then I'm gonna define what color each pixel must have. For example, I'd create a pen mode that paints blue when behind the specified pixel is a light colored one; and paints white when the behind pixel is dark.

Thanks in advance

like image 375
Javid Avatar asked Feb 18 '11 21:02

Javid


1 Answers

The VCL property TPen.Mode maps onto the GDI function SetROP2. This has no option for what you describe and so I believe that what you ask is not possible.

To achieve the sort of effect you are looking for is likely going to require some hand-crafting.

like image 68
David Heffernan Avatar answered Sep 17 '22 21:09

David Heffernan