Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, February 7, 2007 11:34:16 PM(UTC)
ingewitt

Groups: Registered
Posts: 1


Hi,

I am developing an application where an image is loaded into the TLeadImage component.
By pressing a button a certain zone of the image must be emphasized so I want to draw a rectangle around that zone.
I have a little problem with drawing the rectangle: I want the edges of the rectangle to appear in red (by changing the DrawPenColor property), but when I start my application it always shows the edges in black or white. I have tried to change the Drawmode to all other existing properties but I can't get it to work properly. According to the chosen property for Drawmode, the color of the edges always appears in white or black. As a programming language I use Delphi and for colors you can also use constants. So I have also tried to set the DrawPenColor with the color-constant for red:
  Lead1.DrawPenColor := clRed
but this doesn't change anything.

I have written the following code:

  Lead1.DrawPenStyle := psSolid;
  Lead1.DrawPenWidth := 2;
  Lead1.DrawPenColor := RGB(255,0,0);
  Lead1.DrawMode := pmNot;
  Lead1.DrawFillStyle := bsClear;
  Lead1.DrawPersistence := True;
  Lead1.DrawRectangle(157, 98, 541, 54);

 

Can someone help me?

Maybe it is a bug? The version I use is 14.5

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, February 11, 2007 12:03:17 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Hello,

Since the DrawPersistence property is true, the rectangle will be drawn on the image pixels. What is the bits per pixel of the image? Is it full color?
If the image is not full color, the rectangle color will be from colors of the image palette.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.171 seconds.