This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, August 17, 2006 7:51:05 AM(UTC)
Groups: Registered
Posts: 1
Hi, i am trying LT 14.5 Vector Pro.
Is possible add vector overlay on raster image using VB6?
The example "Vector and Raster overlay demo" is good for me, but i need to build it with VB6.
Thanks!
Mauro
#2
Posted
:
Tuesday, August 22, 2006 3:57:59 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
Hello,
To do this you need to load the
raster image on LEAD Main OCX control and load the vector image on LEAD
Vector Control. Then make both controls hidden (.Visible = False). Then
you need to use the Render method as follows:
+-----------------------+
Private Sub Form_Paint()
If LEAD1.Bitmap <> 0 Then 'Use main OCX here
LEAD1.Render Me.hdc, 0, 0, 0, 0
End If
If Not LEADVector1.IsEmpty Then
LEADVector1.Render Me.hdc, 1, 1, Me.ScaleWidth / Screen.TwipsPerPixelX,
Me.ScaleHeight / Screen.TwipsPerPixelY
End If
End Sub
+-----------------------+
Thanks,
Maen Badwan
LEADTOOLS Technical Support
#3
Posted
:
Monday, July 21, 2008 9:31:19 AM(UTC)
Groups: Registered
Posts: 2
I am trying above solution in donnet but not getting overlay function.
plz. help me. how can i implement above in .net.
if any sample code?
Thanks in Advance.
shahaji
#4
Posted
:
Monday, July 21, 2008 10:57:10 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
There's a SetOverlayImage() method for the RasterImage object. Have you looked at that? Search for "GetOverlayImage" in our .NET documentation and we have sample code that shows you how to set and get an overlay image. Let me know if you have any questions.
#5
Posted
:
Monday, July 21, 2008 7:31:21 PM(UTC)
Groups: Registered
Posts: 2
I am serching for vactor raster image overlay. that's why i put my query in this chain.
Thanks for quick reply.
shahaji
#6
Posted
:
Tuesday, July 22, 2008 6:29:21 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
In that case, what you will need to do is first load the vector file as a RasterImage and then use the SetOverlayImage() method on the raster RasterImage. But the thing is that the Vector capability is only available in C/C++. We don't have it in .NET, but we have a work around here:
http://support.leadtools.com/SupportPortal/cs/forums/21587/ShowPost.aspx
That shows you how to load a vector file in .NET and rasterize it. Once you have it rasterized it's simply a matter of loading the other image with RasterCodecs.Load() and then calling SetOverlayImage() on it and passing the rasterized vector image to it. You could also use the CombineCommand depending on what you want to achieve. The demo in the link above gets you there about 90%, the rest is just adding a few lines of code to do the overlay.
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.