Class BaseTextItemHandler
Namespace: Aurigma.DesignAtoms.Canvas.ItemHandlers
Assembly: Aurigma.DesignAtoms.dll
public abstract class BaseTextItemHandler : RectangleItemHandler, ICloneable, IDisposable
Inheritance: System.Object -> Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler -> Aurigma.DesignAtoms.Canvas.ItemHandlers.BaseRectangleItemHandler -> Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler -> Aurigma.DesignAtoms.Canvas.ItemHandlers.RectangleItemHandler -> BaseTextItemHandler
Implements
System.ICloneableSystem.IDisposable
Inherited Members
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.ItemOnPropertyChanged(System.Object, System.ComponentModel.PropertyChangedEventArgs)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.GetBorderColor(Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.GetAltBorderColor(Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.GetFillColor(Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.GetTransformedPath()
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.UpdateControlPoints()
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.GetBorderWidth(System.Single)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.GetShapeDrawer(Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings, Aurigma.DesignAtoms.Model.Color.PixelFormat, System.Single, Aurigma.DesignAtoms.Model.Math.PointF, Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.GetPath()
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.GetDrawingFillColor(Aurigma.DesignAtoms.Model.Color.PixelFormat, Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.FillShape(Aurigma.GraphicsMill.AdvancedDrawing.Graphics, Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings, Aurigma.DesignAtoms.Model.Color.PixelFormat, Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider, System.Boolean, System.Boolean, System.Boolean)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.StrokeShape(Aurigma.GraphicsMill.AdvancedDrawing.Graphics, Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings, Aurigma.DesignAtoms.Model.Color.PixelFormat, Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider, System.Boolean, System.Boolean, System.Boolean)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.DrawShape(Aurigma.DesignAtoms.Canvas.RenderingContext, Aurigma.GraphicsMill.AdvancedDrawing.Graphics, Aurigma.GraphicsMill.IImageParams, Aurigma.DesignAtoms.Canvas.ItemHandlers.DrawItemParams, Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings, Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider, System.Boolean, System.Boolean, System.Boolean, System.Boolean, System.Boolean)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.Path
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.Dash
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.BorderWidth
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ShapeItemHandler.FixedBorderWidth
- Aurigma.DesignAtoms.Canvas.ItemHandlers.BaseRectangleItemHandler.MinDimension
- Aurigma.DesignAtoms.Canvas.ItemHandlers.BaseRectangleItemHandler.GetTransform(System.Drawing.RectangleF, Aurigma.DesignAtoms.Model.Math.RotatedRectangleF)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.BaseRectangleItemHandler.DrawClippingPath(Aurigma.GraphicsMill.AdvancedDrawing.Graphics, System.Action)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.BaseRectangleItemHandler.GetClippingPath(System.Single, System.Boolean)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.BaseRectangleItemHandler.GetTransformedVectorMask(Aurigma.DesignAtoms.Model.Math.Transform, Aurigma.DesignAtoms.Model.Math.PointF, System.Boolean)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.BaseRectangleItemHandler.GetActualDash(System.Single[], System.Boolean, System.Single)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.BaseRectangleItemHandler.Rectangle
- Aurigma.DesignAtoms.Canvas.ItemHandlers.BaseRectangleItemHandler.Angle
- Aurigma.DesignAtoms.Canvas.ItemHandlers.BaseRectangleItemHandler.Height
- Aurigma.DesignAtoms.Canvas.ItemHandlers.BaseRectangleItemHandler.Width
- Aurigma.DesignAtoms.Canvas.ItemHandlers.BaseRectangleItemHandler.Location
- Aurigma.DesignAtoms.Canvas.ItemHandlers.BaseRectangleItemHandler.Opacity
- Aurigma.DesignAtoms.Canvas.ItemHandlers.BaseRectangleItemHandler.TextWrappingMode
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler._stateResourcesRepository
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler._configuration
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler._logger
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler._colorManagement
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler._gmColorConverter
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.Draw(Aurigma.DesignAtoms.Canvas.RenderingContext, Aurigma.GraphicsMill.Bitmap, Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings, Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider, System.Boolean, System.Boolean, System.Boolean)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.Draw(Aurigma.DesignAtoms.Canvas.RenderingContext, Aurigma.GraphicsMill.Bitmap, Aurigma.DesignAtoms.Canvas.ItemHandlers.DrawItemParams, Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings, Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider, System.Boolean, System.Boolean, System.Boolean)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.ItemOnPermissionsChanged(System.Object, System.EventArgs)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.Clone()
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.BeginUpdate()
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.EndUpdate()
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.Dispose()
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.OnChanged()
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.GetDestinationColor(Aurigma.GraphicsMill.Color, Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider, Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings, System.Nullable<Aurigma.DesignAtoms.Model.Color.PixelFormat>, System.Single, System.Boolean, System.Boolean)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.Dispose(System.Boolean)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.UniqueId
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.Transform
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.Tag
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.Layer
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.IsUpdating
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.Index
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.Canvas
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.Name
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.BlendMode
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.Permissions
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.Data
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.Visible
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.Locked
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.SourceColorProfilesOrDefault
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.Changed
System.Object.ToStringSystem.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.ReferenceEquals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseClone
Constructors
BaseTextItemHandler
protected BaseTextItemHandler(IConfiguration configuration, IStateResourcesRepository stateResourcesRepository, IColorManagement colorManagement, IFontService fontService, IUnsupportedGlyphService unsupportedGlyphService, IGmColorConverter gmColorConverter, IColorPreviewService colorPreviewService, BaseTextItem item)
Properties
Item
public BaseTextItem Item { get; }
RenderingMargin
protected virtual int RenderingMargin { get; }
ActualAngle
public double ActualAngle { get; set; }
TextMode
protected TextMode TextMode { get; set; }
PreventUpdate
public bool PreventUpdate { get; set; }
ValidRect
protected bool ValidRect { get; set; }
IsFormatted
protected bool IsFormatted { get; }
CheckTextCrop
public bool CheckTextCrop { get; set; }
Text
public virtual string Text { get; set; }
Font
public IFontSettings Font { get; }
Underline
public bool Underline { get; set; }
Alignment
public TextAlignment Alignment { get; set; }
Tracking
public float Tracking { get; set; }
Leading
public float Leading { get; set; }
VerticalScale
public virtual float VerticalScale { get; set; }
HorizontalScale
public virtual float HorizontalScale { get; set; }
Stroke
public StrokeSettings Stroke { get; set; }
IsStrokeSet
public bool IsStrokeSet { get; }
Shadow
public ShadowSettings Shadow { get; set; }
ControlPoints
public override PointF[] ControlPoints { get; set; }
Bounds
public override RectangleF Bounds { get; }
PreviewScale
public float PreviewScale { get; set; }
IsEmpty
public override bool IsEmpty { get; }
Methods
GetTextWithColors
protected string GetTextWithColors()
Returns
System.String
GetTextColor
public Color GetTextColor(IColorProfilesProvider profilesProvider)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider | profilesProvider |
Returns
Aurigma.GraphicsMill.Color
UpdateSize
public virtual void UpdateSize()
OnTransformChanged
protected override void OnTransformChanged(object sender, EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
System.Object | sender | |
System.EventArgs | e |
Overrides
ApplyTransform
protected abstract void ApplyTransform(Transform transform)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Math.Transform | transform |
ScaleItem
protected void ScaleItem(float scale)
Parameters
| Type | Name | Description |
|---|---|---|
System.Single | scale |
UpdateMask
protected virtual void UpdateMask(Transform transform, PointF controlCenter = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Math.Transform | transform | |
| Aurigma.DesignAtoms.Model.Math.PointF | controlCenter |
GetDrawingRotationCenter
protected abstract PointF GetDrawingRotationCenter(float dpi = 72F)
Parameters
| Type | Name | Description |
|---|---|---|
System.Single | dpi |
Returns
Aurigma.DesignAtoms.Model.Math.PointF
CreateGmFont
protected Font CreateGmFont(Graphics graphics, FontRegistry fontRegistry, bool isVector, ref string text)
Parameters
| Type | Name | Description |
|---|---|---|
Aurigma.GraphicsMill.AdvancedDrawing.Graphics | graphics | |
Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry | fontRegistry | |
System.Boolean | isVector | |
System.String | text |
Returns
Aurigma.GraphicsMill.AdvancedDrawing.Font
CreateText
protected Text CreateText(Graphics graphics, FontRegistry fontRegistry, IRenderingColorSettings colorSettings = null, PixelFormat? destinationPixelFormat = null, Func<string, Graphics, bool, FontRegistry, Text> createAdvancedText = null, string text = null, bool renderOnPdf = false)
Parameters
| Type | Name | Description |
|---|---|---|
Aurigma.GraphicsMill.AdvancedDrawing.Graphics | graphics | |
Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry | fontRegistry | |
| Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings | colorSettings | |
System.Nullable<Aurigma.DesignAtoms.Model.Color.PixelFormat> | destinationPixelFormat | |
System.Func<System.String,Aurigma.GraphicsMill.AdvancedDrawing.Graphics,System.Boolean,Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry,Aurigma.GraphicsMill.AdvancedDrawing.Text> | createAdvancedText | |
System.String | text | |
System.Boolean | renderOnPdf |
Returns
Aurigma.GraphicsMill.AdvancedDrawing.Text
CreateAdvancedText
protected abstract Text CreateAdvancedText(string text, Graphics graphics, bool isVector, FontRegistry fontRegistry)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | text | |
Aurigma.GraphicsMill.AdvancedDrawing.Graphics | graphics | |
System.Boolean | isVector | |
Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry | fontRegistry |
Returns
Aurigma.GraphicsMill.AdvancedDrawing.Text
GetBasicTextAlignment
protected TextAlignment GetBasicTextAlignment(TextAlignment alignment)
Parameters
| Type | Name | Description |
|---|---|---|
Aurigma.GraphicsMill.AdvancedDrawing.TextAlignment | alignment |
Returns
Aurigma.GraphicsMill.AdvancedDrawing.TextAlignment
MeasureText
protected virtual RectangleF MeasureText(out bool? textCropped, float dpi = 72F, bool includeMargins = false)
Parameters
| Type | Name | Description |
|---|---|---|
System.Nullable<System.Boolean> | textCropped | |
System.Single | dpi | |
System.Boolean | includeMargins |
Returns
System.Drawing.RectangleF
MeasureText
protected virtual RectangleF MeasureText(float dpi = 72F, bool includeMargins = false, Func<string, Graphics, bool, FontRegistry, Text> createAdvancedText = null, bool withShadowAndStroke = true)
Parameters
| Type | Name | Description |
|---|---|---|
System.Single | dpi | |
System.Boolean | includeMargins | |
System.Func<System.String,Aurigma.GraphicsMill.AdvancedDrawing.Graphics,System.Boolean,Aurigma.GraphicsMill.AdvancedDrawing.FontRegistry,Aurigma.GraphicsMill.AdvancedDrawing.Text> | createAdvancedText | |
System.Boolean | withShadowAndStroke |
Returns
System.Drawing.RectangleF
CalcMaxSideLengthOfCharBoundsPx
protected int CalcMaxSideLengthOfCharBoundsPx(float dpi)
Parameters
| Type | Name | Description |
|---|---|---|
System.Single | dpi |
Returns
System.Int32
GetDrawingPath
protected override Path GetDrawingPath(float dpi = 72F)
Parameters
| Type | Name | Description |
|---|---|---|
System.Single | dpi |
Returns
Aurigma.GraphicsMill.AdvancedDrawing.Path
Overrides
GetAdvancedTextLeading
protected float GetAdvancedTextLeading()
Returns
System.Single
GetBytes
protected virtual List<byte> GetBytes()
Returns
System.Collections.Generic.List<System.Byte>
GetItemHandlerData
public override ItemHandlerData GetItemHandlerData()
Returns
Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandlerData
Overrides
GetItemHandlerDataType
public override string GetItemHandlerDataType()
Returns
System.String
Overrides
Fields
_fontService
protected readonly IFontService _fontService
_methodMeasurer
protected IMethodMeasurer _methodMeasurer
CurrentTextImage
public BaseTextItemHandler.TextImageData CurrentTextImage
_handlingTransformChanged
protected bool _handlingTransformChanged