Imports Leadtools
Imports Leadtools.Annotations
Imports Leadtools.WinForms
' This sample paints annotations (both 'fixed' and non'fixed) at a zoom factor of 2
' on the Graphics object g
Private Sub AnnContainer_PushFixedState(ByVal graphics As Graphics, ByVal annContainer As AnnContainer)
Dim transformContainer As Matrix = annContainer.Transform
Dim transformOriginal As Matrix = annContainer.Transform.Clone()
' Temporarily disable 'fixed' annotations for painting
annContainer.PushFixedState()
' Paint the container at 2x
Dim transformZoom2x As Matrix = New Matrix(2, 0, 0, 2, 0, 0)
transformContainer.Multiply(transformZoom2x)
annContainer.Draw(graphics)
' Restore original container transform
annContainer.Transform = transformOriginal
' Enable 'fixed' annotions
annContainer.PopFixedState()
End Sub
using Leadtools;
using Leadtools.Annotations;
using Leadtools.WinForms;
// This sample paints annotations (both 'fixed' and non'fixed) at a zoom factor of 2
// on the Graphics object g
private void AnnContainer_PushFixedState(Graphics graphics, AnnContainer annContainer)
{
Matrix transformContainer = annContainer.Transform;
Matrix transformOriginal = annContainer.Transform.Clone();
// Temporarily disable 'fixed' annotations for painting
annContainer.PushFixedState();
// Paint the container at 2x
Matrix transformZoom2x = new Matrix(2, 0, 0, 2, 0, 0);
transformContainer.Multiply(transformZoom2x);
annContainer.Draw(graphics);
// Restore original container transform
annContainer.Transform = transformOriginal;
// Enable 'fixed' annotions
annContainer.PopFixedState();
}