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, October 17, 2007 7:10:54 AM(UTC)
keithway

Groups: Registered
Posts: 29


Im using LT 14.5 for .net. I' m just wondering how do I manipulate the alpha for an AnnHiliteObject? Specifically, can I turn the alpha off and just have a solid hilite object?
 

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 : Thursday, October 18, 2007 7:30:13 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

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

If you
mean that you want to change the back color of the AnnHiliteObject, this can be done using the Background color property.
Please see attached screen shot.




When you
draw an AnnHiliteObject, right click on it, and then go to the Hilite properties, after that select the Background color menu item.


If this is not what you want, please send me more details so I can try to assist you further.
File Attachment(s):
Hilite.zip (44kb) downloaded 27 time(s).
 
#3 Posted : Thursday, October 18, 2007 9:42:20 AM(UTC)
keithway

Groups: Registered
Posts: 29


I'm sorry but this does not solve my problem. The specific problem that I am having is that when I burn in a AnnHiliteObject into an image, no matter what the color of the Hilite object it burns in as solid black because of the alpha transparency.

What I want to do is to programmatically turn the alpha/transparency off so that the Hilite object appears as a solid color. The only property that I have found that has anything to do with color is the .HiliteColor property but this only changes the color and has nothing to do with the transparency.

So how can I just turn off the transparency?
 
#4 Posted : Sunday, October 21, 2007 5:19:25 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

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






If your
image is 1-bit black and white, realizing a Hilite object or any other annotations
object will not necessarily maintain the same color, because the image itself only has a limited palette (such as 2 colors B/W).
If that's the case, realizing will convert the colors to either black or white.


To
verify if this is what's happening, try to load a full-color (24-bit) image and realize the object on it. Does it keep its color?

 
#5 Posted : Monday, October 22, 2007 6:20:13 AM(UTC)
keithway

Groups: Registered
Posts: 29


I appreciate your support but I think things are becoming overcomplicated and a little off target now. I am not realizing any annotations. All I want to do is change the alpha/transparency value for whatever color a hilite object may be.

For example... by default a hilite object is yellow and looks to be about 50% transparent - meaning I can see through the annotation and read what ever is behind it on the image. Programatically, how would I change the hilite object to be 0% transparent to where it would remain yellow but I would not be able to see through it anymore?
 
#6 Posted : Monday, October 22, 2007 6:35:42 AM(UTC)

BoydP  
Guest

Groups: Guests
Posts: 3,022

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

You could simply remove the AnnHiliteObject and replace it with an AnnRectangle to have a solid back color.
 
#7 Posted : Monday, October 22, 2007 6:58:13 AM(UTC)
keithway

Groups: Registered
Posts: 29


Yes, I thought of that but the only problem with it is that the hilite object has a text property that displays text above the rectangle and as far as I can tell all other annotations display the text inside the annotation. So when I replace the hilite annotation with a rectangle or a note or whatever the text is lost so I'm stuck either finding an annotation that I can replace the hilite object with that will look identical or I have to turn the transparency off on the hilite object.
 
#8 Posted : Monday, October 22, 2007 12:38:50 PM(UTC)

BoydP  
Guest

Groups: Guests
Posts: 3,022

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

The SDK provides you will the abililty to create custom annotations.  I would recommend reading this section in the help file, "Implement User Defined Objects With LEADTOOLS Annotations".  Perhaps if you derive your custom object from AnnHiliteObject, you can override the DrawObject method and if you would like the annotation to remain transparent, simply call the base class's DrawObject, otherwise override it and simply draw a solid rectangle. The help file provides a fairly decent amount of information on creating custom annotation objects, so make sure to read it thoroughly. 
 
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-2024, Yet Another Forum.NET
This page was generated in 0.088 seconds.