Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Re: Overlay on raster image with VB6
Started by Mauro at 08-17-2006 12:56. Topic has 5 replies.

Print Search « Previous Thread Next Thread »
  08-17-2006, 12:56
Mauro is not online. Last active: 8/17/2006 5:42:16 PM Mauro

Not Ranked
Joined on 08-17-2006
Posts 1
Overlay on raster image with VB6
Reply Quote
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

   Report 
  08-22-2006, 9:02
Maen Hasan is not online. Last active: 1/8/2009 5:45:48 PM Maen Hasan



Top 10 Posts
Joined on 08-05-2004
Posts 1,880
Re: Overlay on raster image with VB6
Reply Quote
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

   Report 
  07-21-2008, 14:36
shahaji is not online. Last active: 7/22/2008 11:21:50 AM shahaji

Not Ranked
Joined on 07-21-2008
Posts 2
Re: Overlay on raster image with VB6
Reply Quote

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

 

 


   Report 
  07-21-2008, 16:02
jigar is not online. Last active: 12/12/2008 5:08:42 PM jigar



Top 10 Posts
Joined on 08-22-2007
Posts 480
Re: Overlay on raster image with VB6
Reply Quote
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.

LEADTOOLS Technical Support
   Report 
  07-22-2008, 0:36
shahaji is not online. Last active: 7/22/2008 11:21:50 AM shahaji

Not Ranked
Joined on 07-21-2008
Posts 2
Re: Overlay on raster image with VB6
Reply Quote

    I am serching for vactor raster image overlay. that's why i put my query in this chain.

Thanks for quick reply.

shahaji


   Report 
  07-22-2008, 11:34
jigar is not online. Last active: 12/12/2008 5:08:42 PM jigar



Top 10 Posts
Joined on 08-22-2007
Posts 480
Re: Overlay on raster image with VB6
Reply Quote
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.

LEADTOOLS Technical Support
   Report 
Post
LEAD Support Fo... » Developer » Vector » Re: Overlay on raster image with VB6

Powered by Community Server, by Telligent Systems