Q&A - Question

How to set Pen Mode in DK11

Question
larw asked on March 07, 2019, keyword: Developer Kernel
In DK10 I as setting Pen Mode to control the way the line draws
  Canvas.Canvas.Pen.Color := clWhite;
  GISEdit.Canvas.Canvas.Pen.Width := 2;
  GISEdit.Canvas.Canvas.Pen.Mode := pmXor;  // This is the command ?
  GISEdit.Canvas.Canvas.MoveTo(ptLastTempGeoStart.X, ptLastTempGeoStart.Y);
  GISEdit.Canvas.Canvas.LineTo(ptLastTempGeoEnd.X, ptLastTempGeoEnd.Y);

In DK11 How do I do the same ?  
  rdr := GISEdit.renderer;
  rdr.CanvasPen.Color := tgis_color.FromRGB(clWhite);
  rdr.CanvasPen.Width := 2;
//  rdr.CanvasMode := pmXor;   // DOES NOT EXSIST ??
  rdr.CanvasDrawLine(ptLastTempGeoStart.X, ptLastTempGeoStart.Y,ptLastTempGeoEnd.X, ptLastTempGeoEnd.Y);

How do we set the Pen draw mode in the new version ?
 
Answers
Tomasz Kosinski (TatukGIS) replied March 07, 2019
Xoring is not possible on any modern display (not FMX, not Direct2D, etc)

The only solution is just to repaint a window on every change. Because we use caching it is very fast.

Take a look at sample:  https://docs.tatukgis.com/DK11/samples:samples:selectbyshape
If you would like to answer the question please Sign In.
*
*
Please review our recent Privacy Policy.
If you have any questions or requests, please contact us.
Rules
The Questions and Answers (Q & A) is intended to provide a means of communication between TatukGIS customers.
 
  1. Licensed users (with active maintenance play) of TatukGIS products may contribute to the Q & A content. Read-only access is available to anyone.
  2. Keep the content positive and professional.
  3. Be courteous to others by posting information when a question or issue asked on the Q & A is answered or resolved by other means (such as with help from TatukGIS technical support). Offer others at least a hint how the posted question was answered or the issue was resolved.
  4. The Q & A is not a replacement for TatukGIS technical support. TatukGIS team may or may not regularly follow or contribute content.