Change the Border Selection Color with the Mouse

1

Hello, I have the following function below in which I select (with the mouse) a certain coordinate of an image and saved. It turns out that when it's a very CLARA or WHITE image I can not see the space I'm selecting!

Is there any way to change the color of the "border" of the Selection I'm making in the image?

I will only save the part that I selected the image.

procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if IsDown then
  begin
    Canvas.Pen.Style := psDot;
    Canvas.Pen.Mode := pmNotXor;
    Canvas.Rectangle(OldStartX, OldStartY, OldEndX, OldEndY);
    OldEndX := X;
    OldEndY := Y;
    Canvas.Rectangle(StartX, StartY, X, Y);
  end;
end;

Here's a PRINT explaining exactly which EDGE I want to change: link

    
asked by anonymous 07.12.2015 / 19:55

1 answer

2

As a friend, however, as the border line is very thin, you may need to make some adjustments.

Add this property below the pmNotXor :

Canvas.Pen.Color := clRed; //ou a cor de sua escolha

If you need to leave the border more expired you can use:

Canvas.Pen.Width := 2; //ou qualquer tamanho de sua escolha

But for the Width q property it looks cool, you'll have to choose some line styles to stay cool.

I await Feedback!

    
07.12.2015 / 22:04