Gets or sets the AnnPicture used when drawing the locked symbol for locked objects.
public virtual Leadtools.Annotations.AnnPicture LockPicture {get; set;}
Public Overridable Property LockPicture As Leadtools.Annotations.AnnPicture
public:
virtual property Leadtools.Annotations.AnnPicture^ LockPicture {
Leadtools.Annotations.AnnPicture^ get();
void set ( Leadtools.Annotations.AnnPicture^ );
}
The AnnPicture used when drawing the locked symbol for locked objects.
All objects inside the container will use this picture when drawing the object if the object is locked.
The container uses a picture of a "lock" that is created by default. You can change this default picture by using this property.
This property can be set to AnnPicture.Empty to remove the lock picture.
For more information, refer to Implementing Annotation Security. (Deprecated)
using Leadtools;
using Leadtools.Annotations;
using Leadtools.Codecs;
using Leadtools.WinForms;
public void AnnContainer_LockPicture(AnnContainer container)
{
// we are going to create a new lock image that is 20 by 20 red ellipse with a blue cross inside it.
Bitmap btmp = new Bitmap(20, 20, PixelFormat.Format32bppArgb);
using (Graphics graphics = Graphics.FromImage(btmp))
{
// fill the image with a white color
graphics.FillRectangle(Brushes.White, new Rectangle(0, 0, 20, 20));
graphics.FillEllipse(Brushes.Red, new Rectangle(0, 0, 20, 20));
graphics.DrawLine(Pens.Blue, 0, 0, 20, 20);
graphics.DrawLine(Pens.Blue, 20, 0, 0, 20);
}
// create an annotation picture for this image, use white as the transparent color
AnnPicture pic = new AnnPicture(btmp);
pic.TransparentMode = AnnPictureTransparentMode.UseColor;
pic.TransparentColor = Color.White;
// use this picture to draw all locked objects in this container
container.LockPicture = pic;
}
Imports Leadtools
Imports Leadtools.Annotations
Imports Leadtools.Codecs
Imports Leadtools.WinForms
Public Sub AnnContainer_LockPicture(ByVal container As AnnContainer)
' we are going to create a new lock image that is 20 by 20 red ellipse with a blue cross inside it.
Dim btmp As Bitmap = New Bitmap(20, 20, PixelFormat.Format32bppArgb)
Dim g As Graphics = Graphics.FromImage(btmp)
Try
' fill the image with a white color
g.FillRectangle(Brushes.White, New Rectangle(0, 0, 20, 20))
g.FillEllipse(Brushes.Red, New Rectangle(0, 0, 20, 20))
g.DrawLine(Pens.Blue, 0, 0, 20, 20)
g.DrawLine(Pens.Blue, 20, 0, 0, 20)
Finally
CType(g, IDisposable).Dispose()
End Try
' create an annotation picture for this image, use white as the transparent color
Dim pic As AnnPicture = New AnnPicture(btmp)
pic.TransparentMode = AnnPictureTransparentMode.UseColor
pic.TransparentColor = Color.White
' use this picture to draw all locked objects in this container
container.LockPicture = pic
End Sub
Products |
Support |
Feedback: LockPicture Property - Leadtools.Annotations |
Introduction |
Help Version 19.0.2017.6.20
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.