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 : Thursday, February 1, 2007 7:54:37 AM(UTC)
VincentRobert

Groups: Registered
Posts: 5


Hello,

I am currently trying to resize a point tool in order to give it the same screen size whatever the destination rect used to display my image.

A solution I found is to resize the bitmap associated to the annotation, though not very effective, it works quite fine when displaying large images.

Problem is when using small images. The annotation bitmap seems to be using to the same pixel size as the displayed bitmap, so when displaying large pixels for my image, pixels from the point tool are also very big and the resizing destroys my annotation bitmap.

I tried changing the scalar factor but it has no effect. After some experiment, I could not find a way to make the annotation bitmap use a different pixel size than the displayed bitmap.

Is there any way to make the point tool use a different pixel size than the displayed bitmap ?
 

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 4, 2007 5:32:10 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

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

Hello,

Could you please give me more information about what you are trying to do? Can you get a similar case using one of our Annotations demos? If yes, which demo is it, and what are the exact steps?

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Sunday, February 4, 2007 6:22:42 AM(UTC)
VincentRobert

Groups: Registered
Posts: 5


Unfortunately, annotation demos do not use the same behaviour as I expect.

For example, in the demos, drawing a line creates a line that is 1 bitmap pixel wide, assuming the line is still visible on screen.
So the algorithm seems to be : ScreenLineWidth = max(1, BitmapPixelSizeOnScreen);

In my program, I want my annotation to always be the same screen size (ScreenLineWidth = 2). In order to achieve this, I have to set a line width of (2 / Scalar) whenever the destination rect of my image changes. This works fine for line width and other properties like font size.

What I want now is to give the point tool the same behaviour. In the demo, the point tool is bigger with smaller image, which is consistent with the behaviour of other annotations (like PointToolScreenSize = 25 * max(1, BitmapPixelSizeOnScreen))

But in my program, I want the point tool to have a fixed screen size whatever the size of my image is (PointToolScreenSize = 25).

So I think I would have to resize the point tool in the same way as I resize the line width (by setting a size of 25 / Scalar) by I don't know how to resize the point tool.

I can provide a demo program if you want a demo of what I need.
 
#4 Posted : Monday, February 5, 2007 5:51:09 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

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

Hello,

I think I know what you mean. If you want a function that controls the thickness of the AnnPoint object lines, I'm afraid that there is no such feature in LEADTOOLS.

If you want to control the size of the bitmap drawn in the object, you cannot do it with the AnnPoint object, but you can use an AnnStamp object instead, and that object enables you to resize the bitmap as you like.

Maen Badwan
LEADTOOLS Technical Support
 
#5 Posted : Monday, February 5, 2007 6:04:07 AM(UTC)
VincentRobert

Groups: Registered
Posts: 5


Ok, i will try with a Stamp object.

Thanks.
 
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.057 seconds.