Class ImageItemHandler
Namespace: Aurigma.DesignAtoms.Canvas.ItemHandlers
Assembly: Aurigma.DesignAtoms.dll
public class ImageItemHandler : ContentItemHandler, 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 -> Aurigma.DesignAtoms.Canvas.ItemHandlers.ContentItemHandler -> ImageItemHandler
Implements
System.ICloneableSystem.IDisposable
Inherited Members
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ContentItemHandler._fontService
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ContentItemHandler.IsImageAvailable()
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ContentItemHandler.IsDownscaleRequired(System.Drawing.Rectangle, Aurigma.GraphicsMill.IImageParams)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ContentItemHandler.ExtendPipeline(Aurigma.GraphicsMill.Pipeline, Aurigma.GraphicsMill.IImageParams, Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings, Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider, System.Single, out System.Collections.Generic.IEnumerable<System.IDisposable>, Aurigma.DesignAtoms.Model.Math.PointF, System.Boolean, System.Boolean)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ContentItemHandler.AddVectorImageToPipeline(Aurigma.GraphicsMill.Pipeline, System.IO.Stream, System.Single, System.Drawing.Size, System.Boolean, System.Boolean, System.Collections.Generic.IList<System.IDisposable>)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ContentItemHandler.ContentType
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ContentItemHandler.MaskOpacity
- Aurigma.DesignAtoms.Canvas.ItemHandlers.RectangleItemHandler.GetDrawingPath(System.Single)
- Aurigma.DesignAtoms.Canvas.ItemHandlers.RectangleItemHandler.Bounds
- 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.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.OnTransformChanged(System.Object, System.EventArgs)
- 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.IsEmpty
- Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandler.ControlPoints
- 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
ImageItemHandler
public ImageItemHandler(IConfiguration configuration, IFileCache fileCache, IStateResourcesRepository stateResourcesRepository, IColorManagement colorManagement, IImageLoader imageLoader, IItemHandlerFactory itemHandlerFactory, IFontService fontService, ISvgReaderFactory svgReaderFactory, IGmColorConverter gmColorConverter, IPublicImagesProvider publicImagesProvider, IUserImagesProvider userImagesProvider, IRemoteImageLoader remoteImageLoader, ISessionContext sessionContext, ImageItem item)
Properties
Item
public ImageItem Item { get; }
TakeIntoAccountImageDpi
public bool TakeIntoAccountImageDpi { get; }
NeedToDownloadImage
public bool NeedToDownloadImage { get; set; }
SourcePageIndex
public int SourcePageIndex { get; set; }
Effect
public ImageEffect Effect { get; set; }
IsVector
public bool IsVector { get; }
ContainsOnlyVectorElements
public bool ContainsOnlyVectorElements { get; }
PageIndex
protected override int PageIndex { get; }
CanExtendPipeline
public bool CanExtendPipeline { get; }
Methods
GetObjectId
protected override string GetObjectId()
Returns
System.String
Overrides
IsImageAvailableAsync
protected override Task<bool> IsImageAvailableAsync()
Returns
System.Threading.Tasks.Task<System.Boolean>
Overrides
GetImageStreamAsync
protected override Task<Stream> GetImageStreamAsync(float dpi, bool isPreview, IColorProfilesProvider profilesProvider, IRenderingColorSettings colorSettings)
Parameters
| Type | Name | Description |
|---|---|---|
System.Single | dpi | |
System.Boolean | isPreview | |
| Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider | profilesProvider | |
| Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings | colorSettings |
Returns
System.Threading.Tasks.Task<System.IO.Stream>
Overrides
GetItemHandlerData
public override ItemHandlerData GetItemHandlerData()
Returns
Aurigma.DesignAtoms.Canvas.ItemHandlers.ItemHandlerData
Overrides
GetItemHandlerDataType
public override string GetItemHandlerDataType()
Returns
System.String
Overrides
IsUpscaleRequired
protected override bool IsUpscaleRequired(bool isSingleColorTargetContainer, IImageParams sourceElement, float dpiX, float dpiY)
Parameters
| Type | Name | Description |
|---|---|---|
System.Boolean | isSingleColorTargetContainer | |
Aurigma.GraphicsMill.IImageParams | sourceElement | |
System.Single | dpiX | |
System.Single | dpiY |
Returns
System.Boolean
Overrides
AddImageEffectToPipeline
protected override Pipeline AddImageEffectToPipeline(IConfiguration configuration, IImageParams source, Pipeline pipeline, PixelFormat colorizeDestPixelFormat, IRenderingColorSettings colorSettings, IColorProfilesProvider profilesProvider, IList<IDisposable> deps)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Configuration.IConfiguration | configuration | |
Aurigma.GraphicsMill.IImageParams | source | |
Aurigma.GraphicsMill.Pipeline | pipeline | |
| Aurigma.DesignAtoms.Model.Color.PixelFormat | colorizeDestPixelFormat | |
| Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings | colorSettings | |
| Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider | profilesProvider | |
System.Collections.Generic.IList<System.IDisposable> | deps |
Returns
Aurigma.GraphicsMill.Pipeline
Overrides
AddOverlayEffectToPipeline
protected override void AddOverlayEffectToPipeline(IImageParams reader, Pipeline pipeline, IRenderingColorSettings colorSettings, PixelFormat destinationPixelFormat, IColorProfilesProvider profilesProvider)
Parameters
| Type | Name | Description |
|---|---|---|
Aurigma.GraphicsMill.IImageParams | reader | |
Aurigma.GraphicsMill.Pipeline | pipeline | |
| Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings | colorSettings | |
| Aurigma.DesignAtoms.Model.Color.PixelFormat | destinationPixelFormat | |
| Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider | profilesProvider |
Overrides
GetDrawingFillColor
protected override Color GetDrawingFillColor(PixelFormat destinationPixelFormat, IColorProfilesProvider profilesProvider)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Color.PixelFormat | destinationPixelFormat | |
| Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider | profilesProvider |
Returns
Aurigma.GraphicsMill.Color
Overrides
DrawContent
protected override void DrawContent(RenderingContext renderingContext, Graphics graphics, IImageParams destImageParams, DrawItemParams drawItemParams, IRenderingColorSettings colorSettings, IColorProfilesProvider profilesProvider, bool rasterizeVectorLayers, CompressionType? pdfCompression, bool isPreview, bool isSingleColorTargetContainer, bool isPdfRenderDeviceProfileEnabled, ImageEffect effect)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Canvas.RenderingContext | renderingContext | |
Aurigma.GraphicsMill.AdvancedDrawing.Graphics | graphics | |
Aurigma.GraphicsMill.IImageParams | destImageParams | |
| Aurigma.DesignAtoms.Canvas.ItemHandlers.DrawItemParams | drawItemParams | |
| Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings | colorSettings | |
| Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider | profilesProvider | |
System.Boolean | rasterizeVectorLayers | |
System.Nullable<Aurigma.DesignAtoms.Configuration.RenderingConfig.CompressionType> | pdfCompression | |
System.Boolean | isPreview | |
System.Boolean | isSingleColorTargetContainer | |
System.Boolean | isPdfRenderDeviceProfileEnabled | |
| Aurigma.DesignAtoms.Model.Items.ImageEffect | effect |
Overrides
NeedRasterizeVectorContent
protected override bool NeedRasterizeVectorContent()
Returns
System.Boolean
Overrides
GetImageCombiner
protected override Transform GetImageCombiner(IImageParams destImageParams, IRenderingColorSettings colorSettings, IColorProfilesProvider profilesProvider, float scale, IEnumerable<IDisposable> deps, ScaleAlpha alpha, PointF offset, bool isPreview, bool isSingleColorTargetContainer = false)
Parameters
| Type | Name | Description |
|---|---|---|
Aurigma.GraphicsMill.IImageParams | destImageParams | |
| Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings | colorSettings | |
| Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider | profilesProvider | |
System.Single | scale | |
System.Collections.Generic.IEnumerable<System.IDisposable> | deps | |
Aurigma.GraphicsMill.Transforms.ScaleAlpha | alpha | |
| Aurigma.DesignAtoms.Model.Math.PointF | offset | |
System.Boolean | isPreview | |
System.Boolean | isSingleColorTargetContainer |
Returns
Aurigma.GraphicsMill.Transforms.Transform
Overrides
GetOverlayEffect
public static IEnumerable<PipelineElement> GetOverlayEffect(OverlayEffect overlayEffect, IImageParams source, Pipeline currentPipeline, IColorManagement colorManagement, IRenderingColorSettings colorSettings, IColorProfilesProvider profilesProvider, IConfiguration conf, IGmColorConverter gmColorConverter)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Items.OverlayEffect | overlayEffect | |
Aurigma.GraphicsMill.IImageParams | source | |
Aurigma.GraphicsMill.Pipeline | currentPipeline | |
| Aurigma.DesignAtoms.ColorManagement.IColorManagement | colorManagement | |
| Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings | colorSettings | |
| Aurigma.DesignAtoms.ColorManagement.IColorProfilesProvider | profilesProvider | |
| Aurigma.DesignAtoms.Configuration.IConfiguration | conf | |
| Aurigma.DesignAtoms.ColorManagement.IGmColorConverter | gmColorConverter |
Returns
System.Collections.Generic.IEnumerable<Aurigma.GraphicsMill.PipelineElement>
VectorContentSupported
public static bool VectorContentSupported(IConfiguration configuration, FileFormat fileFormat, IExternalConverter externalConverter = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Configuration.IConfiguration | configuration | |
| Aurigma.DesignAtoms.Model.Configuration.FileFormat | fileFormat | |
| Aurigma.DesignAtoms.Common.ExternalConverter.IExternalConverter | externalConverter |
Returns
System.Boolean
GetAlphaMaskPipelines
public static IEnumerable<PipelineElement> GetAlphaMaskPipelines(Bitmap bitmap, Size size)
Parameters
| Type | Name | Description |
|---|---|---|
Aurigma.GraphicsMill.Bitmap | bitmap | |
System.Drawing.Size | size |
Returns
System.Collections.Generic.IEnumerable<Aurigma.GraphicsMill.PipelineElement>
UpdateRectangle
public override void UpdateRectangle(bool keepLocation, PlaceholderItem.ResizeMode resizeMode, PlaceholderItem parentPlaceholder, float? sourceWidth = null, float? sourceHeight = null, float? dpiX = null, float? dpiY = null)
Parameters
| Type | Name | Description |
|---|---|---|
System.Boolean | keepLocation | |
| Aurigma.DesignAtoms.Model.Items.PlaceholderItem.ResizeMode | resizeMode | |
| Aurigma.DesignAtoms.Model.Items.PlaceholderItem | parentPlaceholder | |
System.Nullable<System.Single> | sourceWidth | |
System.Nullable<System.Single> | sourceHeight | |
System.Nullable<System.Single> | dpiX | |
System.Nullable<System.Single> | dpiY |
Overrides
SetWidth
public void SetWidth(float width, bool calculateHeight = true)
Parameters
| Type | Name | Description |
|---|---|---|
System.Single | width | |
System.Boolean | calculateHeight |
SetHeight
public void SetHeight(float height, bool calculateWidth = true)
Parameters
| Type | Name | Description |
|---|---|---|
System.Single | height | |
System.Boolean | calculateWidth |
UpdateImageItemRectangle
public static void UpdateImageItemRectangle(IItemHandlerFactory itemHandlerFactory, IImageLoader imageLoader, ContentItem contentItem, bool keepLocation, PlaceholderItem.ResizeMode resizeMode, PlaceholderItem parentPlaceholder)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Canvas.ItemHandlers.IItemHandlerFactory | itemHandlerFactory | |
| Aurigma.DesignAtoms.Canvas.IImageLoader | imageLoader | |
| Aurigma.DesignAtoms.Model.Items.ContentItem | contentItem | |
System.Boolean | keepLocation | |
| Aurigma.DesignAtoms.Model.Items.PlaceholderItem.ResizeMode | resizeMode | |
| Aurigma.DesignAtoms.Model.Items.PlaceholderItem | parentPlaceholder |