Skip to main content

Class ContentItemHandler

Namespace: Aurigma.DesignAtoms.Canvas.ItemHandlers​
Assembly: Aurigma.DesignAtoms.dll​
Syntax
public abstract class ContentItemHandler : 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 -> ContentItemHandler

Implements​

  • System.ICloneable
  • System.IDisposable

Inherited Members​

Constructors​

ContentItemHandler​

protected ContentItemHandler(IConfiguration configuration, IStateResourcesRepository stateResourcesRepository, IColorManagement colorManagement, IItemHandlerFactory itemHandlerFactory, IFontService fontService, ISvgReaderFactory svgReaderFactory, IGmColorConverter gmColorConverter, ContentItem item)

ContentItemHandler​

protected ContentItemHandler(IConfiguration configuration, IStateResourcesRepository stateResourcesRepository, IColorManagement colorManagement, IItemHandlerFactory itemHandlerFactory, IFontService fontService, ISvgReaderFactory svgReaderFactory, IGmColorConverter gmColorConverter, ContentItem item, RectangleF rectangle)

Properties​

ContentType​

public ContentType ContentType { get; set; }

Item​

public ContentItem Item { get; }

MaskOpacity​

public double MaskOpacity { get; set; }

PageIndex​

protected virtual int PageIndex { get; }

Methods​

GetObjectId​

protected abstract string GetObjectId()
Returns​

System.String

NeedRasterizeVectorContent​

protected virtual bool NeedRasterizeVectorContent()
Returns​

System.Boolean

IsImageAvailableAsync​

protected abstract Task<bool> IsImageAvailableAsync()
Returns​

System.Threading.Tasks.Task<System.Boolean>

GetImageStreamAsync​

protected abstract Task<Stream> GetImageStreamAsync(float dpi, bool isPreview, IColorProfilesProvider profilesProvider, IRenderingColorSettings colorSettings)
Parameters​
TypeNameDescription
System.Singledpi
System.BooleanisPreview
Aurigma.DesignAtoms.ColorManagement.IColorProfilesProviderprofilesProvider
Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettingscolorSettings
Returns​

System.Threading.Tasks.Task<System.IO.Stream>

IsImageAvailable​

protected bool IsImageAvailable()
Returns​

System.Boolean

AddImageEffectToPipeline​

protected virtual Pipeline AddImageEffectToPipeline(IConfiguration configuration, IImageParams source, Pipeline currentPipeline, PixelFormat colorizeDestPixelFormat, IRenderingColorSettings colorSettings, IColorProfilesProvider profilesProvider, IList<IDisposable> deps)
Parameters​
TypeNameDescription
Aurigma.DesignAtoms.Configuration.IConfigurationconfiguration
Aurigma.GraphicsMill.IImageParamssource
Aurigma.GraphicsMill.PipelinecurrentPipeline
Aurigma.DesignAtoms.Model.Color.PixelFormatcolorizeDestPixelFormat
Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettingscolorSettings
Aurigma.DesignAtoms.ColorManagement.IColorProfilesProviderprofilesProvider
System.Collections.Generic.IList<System.IDisposable>deps
Returns​

Aurigma.GraphicsMill.Pipeline

AddOverlayEffectToPipeline​

protected virtual void AddOverlayEffectToPipeline(IImageParams reader, Pipeline pipeline, IRenderingColorSettings colorSettings, PixelFormat destinationPixelFormat, IColorProfilesProvider profilesProvider)
Parameters​
TypeNameDescription
Aurigma.GraphicsMill.IImageParamsreader
Aurigma.GraphicsMill.Pipelinepipeline
Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettingscolorSettings
Aurigma.DesignAtoms.Model.Color.PixelFormatdestinationPixelFormat
Aurigma.DesignAtoms.ColorManagement.IColorProfilesProviderprofilesProvider

DrawContent​

protected virtual 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​
TypeNameDescription
Aurigma.DesignAtoms.Canvas.RenderingContextrenderingContext
Aurigma.GraphicsMill.AdvancedDrawing.Graphicsgraphics
Aurigma.GraphicsMill.IImageParamsdestImageParams
Aurigma.DesignAtoms.Canvas.ItemHandlers.DrawItemParamsdrawItemParams
Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettingscolorSettings
Aurigma.DesignAtoms.ColorManagement.IColorProfilesProviderprofilesProvider
System.BooleanrasterizeVectorLayers
System.Nullable<Aurigma.DesignAtoms.Configuration.RenderingConfig.CompressionType>pdfCompression
System.BooleanisPreview
System.BooleanisSingleColorTargetContainer
System.BooleanisPdfRenderDeviceProfileEnabled
Aurigma.DesignAtoms.Model.Items.ImageEffecteffect

IsDownscaleRequired​

protected bool IsDownscaleRequired(Rectangle imageRect, IImageParams firstElement)
Parameters​
TypeNameDescription
System.Drawing.RectangleimageRect
Aurigma.GraphicsMill.IImageParamsfirstElement
Returns​

System.Boolean

IsUpscaleRequired​

protected virtual bool IsUpscaleRequired(bool isSingleColorTargetContainer, IImageParams sourceElement, float dpiX, float dpiY)
Parameters​
TypeNameDescription
System.BooleanisSingleColorTargetContainer
Aurigma.GraphicsMill.IImageParamssourceElement
System.SingledpiX
System.SingledpiY
Returns​

System.Boolean

ExtendPipeline​

public void ExtendPipeline(Pipeline pipeline, IImageParams destImageParams, IRenderingColorSettings colorSettings, IColorProfilesProvider profilesProvider, float scale, out IEnumerable<IDisposable> deps, PointF offset, bool isPreview, bool isSingleColorContainer)
Parameters​
TypeNameDescription
Aurigma.GraphicsMill.Pipelinepipeline
Aurigma.GraphicsMill.IImageParamsdestImageParams
Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettingscolorSettings
Aurigma.DesignAtoms.ColorManagement.IColorProfilesProviderprofilesProvider
System.Singlescale
System.Collections.Generic.IEnumerable<System.IDisposable>deps
Aurigma.DesignAtoms.Model.Math.PointFoffset
System.BooleanisPreview
System.BooleanisSingleColorContainer

GetImageCombiner​

protected virtual Transform GetImageCombiner(IImageParams destImageParams, IRenderingColorSettings colorSettings, IColorProfilesProvider profilesProvider, float scale, IEnumerable<IDisposable> deps, ScaleAlpha alpha, PointF offset, bool isPreview, bool isSingleColorTargetContainer = false)
Parameters​
TypeNameDescription
Aurigma.GraphicsMill.IImageParamsdestImageParams
Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettingscolorSettings
Aurigma.DesignAtoms.ColorManagement.IColorProfilesProviderprofilesProvider
System.Singlescale
System.Collections.Generic.IEnumerable<System.IDisposable>deps
Aurigma.GraphicsMill.Transforms.ScaleAlphaalpha
Aurigma.DesignAtoms.Model.Math.PointFoffset
System.BooleanisPreview
System.BooleanisSingleColorTargetContainer
Returns​

Aurigma.GraphicsMill.Transforms.Transform

AddVectorImageToPipeline​

protected virtual IImageParams AddVectorImageToPipeline(Pipeline pipeline, Stream stream, float destDpi, Size destSize, bool isPreview, bool isSingleColorTargetContainer, IList<IDisposable> disposables)
Parameters​
TypeNameDescription
Aurigma.GraphicsMill.Pipelinepipeline
System.IO.Streamstream
System.SingledestDpi
System.Drawing.SizedestSize
System.BooleanisPreview
System.BooleanisSingleColorTargetContainer
System.Collections.Generic.IList<System.IDisposable>disposables
Returns​

Aurigma.GraphicsMill.IImageParams

UpdateRectangle​

public virtual void UpdateRectangle(bool keepLocation, PlaceholderItem.ResizeMode resizeMode, PlaceholderItem parentPlaceholder, float? sourceWidth = null, float? sourceHeight = null, float? dpiX = null, float? dpiY = null)
Parameters​
TypeNameDescription
System.BooleankeepLocation
Aurigma.DesignAtoms.Model.Items.PlaceholderItem.ResizeModeresizeMode
Aurigma.DesignAtoms.Model.Items.PlaceholderItemparentPlaceholder
System.Nullable<System.Single>sourceWidth
System.Nullable<System.Single>sourceHeight
System.Nullable<System.Single>dpiX
System.Nullable<System.Single>dpiY

Fields​

_fontService​

protected readonly IFontService _fontService
Was this page helpful?