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, October 4, 2012 5:55:05 AM(UTC)
MRTrevorF

Groups: Registered
Posts: 7


I thought I'd ask to see if there was any pre-existing solution for this, or some creative use of the existing features in LeadTools.

Basically I need to allow the User to select an item from a RasterImageList and have the item visually change in some way. This needs to be a separate system from the "Selected" property as I am already using this.

I'd like to put a fixed size rectangle or circle in the to-right corner of the picture, like an overlay.

I tried doing this using AddRectangleToRegion. The results, though, varied in relative size on screen. I'm guessing this is due to differing image dimensions of the pictures.

In a perfect world, I'd like to superimpose an existing PNG file in the top right corner.

Any thoughts?
 

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 : Friday, October 5, 2012 11:42:07 AM(UTC)

JamesD  
Guest

Groups: Guests
Posts: 3,040

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

Hello MRTrevorF,

Based on your description, it sounds like you would want to use the OwnerDraw RasterImageListViewStyle, and then draw a shape or combine an image with ImageList item.

You can do this by handling the RasterImageList.DrawItem event. This link has more information about that event as well as example code for how to draw text on top of the item:
http://www.leadtools.com/help/leadtools/v175/dh/wi/leadtools.winforms~leadtools.winforms.rasterimagelist~drawitem_ev.html

You are not limited to drawing text though. You could use any of the shapes available in the System.Drawing.Graphics class with that example:
http://msdn.microsoft.com/en-us/library/system.drawing.graphics(v=vs.100).aspx

If you would like to place a PNG file on top of each image, you can use the CombineCommand:
http://www.leadtools.com/help/leadtools/v175/dh/pe/leadtools.imageprocessing.effects~leadtools.imageprocessing.effects.combinecommand.html

or the AlphaBlend command if your overlay image contains transparency information:
http://www.leadtools.com/help/leadtools/v175/dh/pe/leadtools.imageprocessing.effects~leadtools.imageprocessing.effects.alphablendcommand.html
 
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-2019, Yet Another Forum.NET
This page was generated in 0.104 seconds.