LEADTOOLS Support
General
General Questions
RasterImageList - looking for a solution
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, October 4, 2012 5:50:05 AM(UTC)
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?
#2
Posted
:
Friday, October 5, 2012 11:37:07 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 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
LEADTOOLS Support
General
General Questions
RasterImageList - looking for a solution
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.