LEADTOOLS Support
General
LEADTOOLS SDK Examples
How to create an AnnRectangleObject with multicolor frame
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, November 29, 2012 3:12:13 AM(UTC)
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
#2
Posted
:
Thursday, November 29, 2012 8:47:48 AM(UTC)
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):
Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.
LEADTOOLS Support
General
LEADTOOLS SDK Examples
How to create an AnnRectangleObject with multicolor frame
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.