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 : Wednesday, November 1, 2006 8:19:57 AM(UTC)
jon-paul.faucher

Groups: Registered
Posts: 15


Sorry for all the questions but i'm new to this digital paint stuff and am trying to get some basics down. I have a simple application in C# (Lead Tools 14.5 Raster Pro) that loads an image from file into a RasterView control and I am trying to use the digital paint class to draw a rectangle onto the image. I've searched the Help files and have not had any luck finding anything that does this in C#. Can someone provide me with some direction on howto draw a basic opaque rectangle using these controls.

thanks,

jp

 

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 : Thursday, November 2, 2006 1:09:13 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

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




You can use the GDI Plus Graphics instead of Digital Paint to create a basic rectangle  in your application.

For more information and code sample, please refer to the "IRasterImage.CreateGdiPlusGraphics Method" topic in LEADTOOLS .NET Help file.


 

 
#3 Posted : Thursday, November 2, 2006 2:58:54 AM(UTC)
jon-paul.faucher

Groups: Registered
Posts: 15


I am not using the .net package, just the standard Lead Tools Raster Pro 14.5.

jp

 
#4 Posted : Thursday, November 2, 2006 5:52:56 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

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




There is a way to create a basic rectangle in your application without using the Digital Paint.


If you are using LEADTOOLS COM Object, you can use the DrawRectangle
method. For more information about it, please refer to the "DrawRectangle method (ILEADRasterFXD)" topic in the LEADTOOLS Main COM Object Help file.


If you are using LEADTOOLS ActiveX, you can also use
the DrawRectangle method. For more information about this method, please refer
to the "DrawRectangle method (Main Control)" topic in the LEADTOOLS Main OCX Help file.
 
#5 Posted : Thursday, November 2, 2006 6:41:56 AM(UTC)
jon-paul.faucher

Groups: Registered
Posts: 15


Do these methods allow me to apply opacity to the fill? I was under the impression that I needed digital paint in order to accomplish this.

thanks

jp

 
#6 Posted : Friday, November 3, 2006 6:24:28 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


If you don't want a variable opacity (solid color), then you can use the Main Control:

LEAD1.DrawPenColor = RGB(255, 0, 0)
LEAD1.DrawFillColor = RGB(255, 0, 0)
LEAD1.DrawFillStyle = DRAWFILLSTYLE_SOLID
LEAD1.DrawRectangle 50, 50, 100, 100

However, if you DO want variable opacity, so that the rectangle is see-through, then you must use the digital paint control:

LEADPaint1.Shape.BorderColor = RGB(255, 0, 0)
LEADPaint1.Shape.BackgroundColor = RGB(255, 0, 0)
LEADPaint1.Shape.Opacity = 150
LEADPaint1.Shape.DrawRect 50, 50, 100, 100
 
#7 Posted : Monday, November 6, 2006 10:11:27 AM(UTC)
jon-paul.faucher

Groups: Registered
Posts: 15


That't exactly what I was looking for. Thanks for the info!!!!

jp

 
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-2024, Yet Another Forum.NET
This page was generated in 0.065 seconds.