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, November 29, 2012 3:12:13 AM(UTC)
DrGonzo27

Groups: Registered
Posts: 3


Hi Leadtools Community,

using .NET 4.0 version 17.5 on WindowsOS.

I am using this snippet to draw a rectangle to mark something on a picture.

                    AnnRectangleObject annRectangleObject = new AnnRectangleObject();

                    annRectangleObject.Pen = new AnnPen(Color.White, new AnnLength((float)5, AnnUnit.Pixel));
                    annRectangleObject.Brush = new AnnSolidBrush(Color.White);

Is it in an easy way possible to change the color of the AnnPen or AnnSolidBrush to an alternating color or load a color from a Bitmap? My solution works fine as long as the image the AnnRectangleObject is drawn on contains a lot of Color.White then You can not see it any more ;)

Any Suggestions or another recommended annotations object that accepts two colors or a bitmap to draw its frame an inside?

Thank You,
Andre
 

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 29, 2012 8:47:48 AM(UTC)

mohamed  
mohamed

Groups: Registered, Tech Support
Posts: 179


Andre,

There is no support for multiple colors in one rectangle pen. However, you can have a brush with more than one color as shown in the attached shape image.
You can also draw 2 lines in the same location and give them different Pen width and different dash styles as show in the other shape (one green with width 1, the other red with width 2). You can also group the 2 rectangles together to make them act as one object.
mohamed attached the following image(s):
2Rectangles.PNG
Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
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.