C# Class PdfSharp.Xps.Rendering.PdfContentWriter

Afficher le fichier Open project: homoluden/WPF2PDF Class Usage Examples

Private Properties

Свойство Type Description
BeginGraphic void
BeginText void
CreateDefaultTransparencyGroup void
GetContent string
GetFontName string
GetFontName string
GetFontName string
TryGetFontName string
WriteCanvas void
WriteGeometry void
WriteGlyphs void
WriteGlyphs_ClusterMapping void
WriteGlyphs_DistanceOnly void
WriteGlyphs_GlyphIndicesAndDistanceOnly void
WriteGlyphs_Indices1 void
WriteGlyphs_None void
WriteMoveStart void
WritePath void
WritePathFillStroke void
WriteSegment void
WriteSegment void
WriteSegment void
WriteSingleLineStrokeWithSpecialCaps bool
WriteStrokeGeometry void
WriteVisual void

Méthodes publiques

Méthode Description
AddCapToPath ( PdfSharp.Xps.XpsModel.Path path, PdfSharp.Xps.XpsModel.PathFigure figure, double length, double lineWidthHalf, LineCap lineCap, PdfSharp.Drawing.XMatrix matrix ) : void
AdjustTextMatrix ( PdfSharp.Drawing.XPoint &pos ) : void
BeginContent ( bool hacks4softmask ) : void

Initializes the default view transformation, i.e. the transformation from the user page space to the PDF page space.

BeginContentRaw ( ) : void

Just save current state.

Close ( ) : void

Closes the underlying content stream.

EndContent ( ) : void
MultiplyOpacity ( double opacity ) : double

Muliplies the spcified opacity with the current opacity and returns the new value;

MultiplyTransform ( PdfSharp.Drawing.XMatrix matrix ) : PdfSharp.Drawing.XMatrix

Muliplies the spcified transformation with the current transformation and returns the new value;

PdfContentWriter ( PdfSharp.Xps.Rendering.DocumentRenderingContext context, PdfSharp.Pdf.PdfDictionary contentDictionary ) : System

PdfContentWriter ( PdfSharp.Xps.Rendering.DocumentRenderingContext context, PdfPage page ) : System

Initializes a new instance of the PdfContentWriter class for creating a content stream of the specified page.

PdfContentWriter ( PdfSharp.Xps.Rendering.DocumentRenderingContext context, PdfSharp.Drawing.XForm form, RenderMode renderMode ) : System

Initializes a new instance of the PdfContentWriter class for creating a content stream of the specified form.

RealizeExtGState ( PdfSharp.Pdf.Advanced.PdfExtGState xgState ) : void

Realizes the specified graphic state.

RealizeFill ( PdfSharp.Xps.XpsModel.Brush brush, PdfSharp.Drawing.XForm &xform, PdfSharp.Drawing.XImage &ximage ) : void

Makes the specified brush to the current graphics object.

RealizeFillOpacity ( double opacity ) : void

Realizes the opacity for non-stroke operations.

RealizeFont ( PdfSharp.Xps.XpsModel.Glyphs glyphs ) : void

Makes the specified font and brush to the current graphics objects.

RealizeStroke ( PdfSharp.Xps.XpsModel.Path path ) : void

Makes the specified pen to the current graphics object.

RealizeStrokeOpacity ( double opacity ) : void

Realizes the opacity for stroke operations.

WriteClip ( PdfSharp.Xps.XpsModel.PathGeometry geo ) : void

Writes the specified PathGeometry as intersection with the current clip path to the content stream.

WriteClip ( PdfSharp.Drawing.XRect rect ) : void

Writes the specified rectangle as intersection with the current clip path to the content stream.

WriteElement ( XpsElement element ) : void

Writes the specified element to the content stream.

WriteElements ( XpsElementCollection elements ) : void

Writes all elements of the collection to the content stream.

WriteOpacityMask ( PdfSharp.Xps.XpsModel.Brush brush ) : void
WriteRenderTransform ( PdfSharp.Drawing.XMatrix matrix ) : void

Writes the specified transformation matrix to the content stream.

WriteRestoreState ( string traceMessage, string elementName ) : void

Restores the previous graphical state and writes a pop state operator to the content stream.

WriteSaveState ( string traceMessage, string elementName ) : void

Saves the current graphical state and writes a push state operator to the content stream.

WriteSegment ( PdfSharp.Xps.XpsModel.PolyLineSegment seg ) : void

Writes the specified PolyLineSegment to the content stream.

WriteTextTransform ( PdfSharp.Drawing.XMatrix matrix ) : void

Writes the specified text transformation matrix to the content stream.

Private Methods

Méthode Description
BeginGraphic ( ) : void

Begins the graphic mode (i.e. ends the text mode).

BeginText ( ) : void

Begins the text mode.

CreateDefaultTransparencyGroup ( ) : void
GetContent ( ) : string

Gets the content created by this renderer.

GetFontName ( PdfSharp.Xps.XpsModel.Font font ) : string

Gets the resource name of the specified font within this page or form.

GetFontName ( PdfSharp.Drawing.XFont font, PdfSharp.Pdf.Advanced.PdfFont &pdfFont ) : string

Gets the resource name of the specified font within this page or form.

GetFontName ( string idName, byte fontData, PdfSharp.Pdf.Advanced.PdfFont &pdfFont ) : string

Gets the resource name of the specified font within this page or form.

TryGetFontName ( string idName, PdfSharp.Pdf.Advanced.PdfFont &pdfFont ) : string

Tries to get the resource name of the specified font within this page or form. Returns null if no such font exists.

WriteCanvas ( PdfSharp.Xps.XpsModel.Canvas canvas ) : void

Writes a Canvas to the content stream.

WriteGeometry ( PdfSharp.Xps.XpsModel.PathGeometry geo ) : void

Writes the specified PathGeometry to the content stream.

WriteGlyphs ( PdfSharp.Xps.XpsModel.Glyphs glyphs ) : void

Writes a Glyphs to the content stream.

WriteGlyphs_ClusterMapping ( PdfSharp.Xps.XpsModel.Glyphs glyphs, string text ) : void
WriteGlyphs_DistanceOnly ( PdfSharp.Xps.XpsModel.Glyphs glyphs, string text ) : void
WriteGlyphs_GlyphIndicesAndDistanceOnly ( PdfSharp.Xps.XpsModel.Glyphs glyphs, string text ) : void
WriteGlyphs_Indices1 ( PdfSharp.Xps.XpsModel.Glyphs glyphs, string text ) : void
WriteGlyphs_None ( PdfSharp.Xps.XpsModel.Glyphs glyphs, string text ) : void
WriteMoveStart ( Point point ) : void
WritePath ( PdfSharp.Xps.XpsModel.Path path ) : void

Writes a Path to the content stream.

WritePathFillStroke ( PdfSharp.Xps.XpsModel.Path path ) : void

Writes the path fill and/or stroke operators to the content stream.

WriteSegment ( PdfSharp.Xps.XpsModel.ArcSegment seg ) : void

Writes the specified ArcSegment to the content stream.

WriteSegment ( PdfSharp.Xps.XpsModel.PolyBezierSegment seg ) : void

Writes the specified PolyBezierSegment to the content stream.

WriteSegment ( PdfSharp.Xps.XpsModel.PolyQuadraticBezierSegment seg ) : void

Writes the specified PolyQuadraticBezierSegment to the content stream.

WriteSingleLineStrokeWithSpecialCaps ( PdfSharp.Xps.XpsModel.Path path ) : bool

If the path is a single line with different start and end caps, convert the line into an area.

WriteStrokeGeometry ( PdfSharp.Xps.XpsModel.Path path ) : void

Strokes the path geometry with the Stroke brush.

WriteVisual ( PdfSharp.Xps.XpsModel.Visual visual ) : void

Writes a Visual to the content stream.

Method Details

AddCapToPath() public méthode

public AddCapToPath ( PdfSharp.Xps.XpsModel.Path path, PdfSharp.Xps.XpsModel.PathFigure figure, double length, double lineWidthHalf, LineCap lineCap, PdfSharp.Drawing.XMatrix matrix ) : void
path PdfSharp.Xps.XpsModel.Path
figure PdfSharp.Xps.XpsModel.PathFigure
length double
lineWidthHalf double
lineCap LineCap
matrix PdfSharp.Drawing.XMatrix
Résultat void

AdjustTextMatrix() public méthode

public AdjustTextMatrix ( PdfSharp.Drawing.XPoint &pos ) : void
pos PdfSharp.Drawing.XPoint
Résultat void

BeginContent() public méthode

Initializes the default view transformation, i.e. the transformation from the user page space to the PDF page space.
public BeginContent ( bool hacks4softmask ) : void
hacks4softmask bool
Résultat void

BeginContentRaw() public méthode

Just save current state.
public BeginContentRaw ( ) : void
Résultat void

Close() public méthode

Closes the underlying content stream.
public Close ( ) : void
Résultat void

EndContent() public méthode

public EndContent ( ) : void
Résultat void

MultiplyOpacity() public méthode

Muliplies the spcified opacity with the current opacity and returns the new value;
public MultiplyOpacity ( double opacity ) : double
opacity double
Résultat double

MultiplyTransform() public méthode

Muliplies the spcified transformation with the current transformation and returns the new value;
public MultiplyTransform ( PdfSharp.Drawing.XMatrix matrix ) : PdfSharp.Drawing.XMatrix
matrix PdfSharp.Drawing.XMatrix
Résultat PdfSharp.Drawing.XMatrix

PdfContentWriter() public méthode

public PdfContentWriter ( PdfSharp.Xps.Rendering.DocumentRenderingContext context, PdfSharp.Pdf.PdfDictionary contentDictionary ) : System
context PdfSharp.Xps.Rendering.DocumentRenderingContext
contentDictionary PdfSharp.Pdf.PdfDictionary
Résultat System

PdfContentWriter() public méthode

Initializes a new instance of the PdfContentWriter class for creating a content stream of the specified page.
public PdfContentWriter ( PdfSharp.Xps.Rendering.DocumentRenderingContext context, PdfPage page ) : System
context PdfSharp.Xps.Rendering.DocumentRenderingContext
page PdfSharp.Pdf.PdfPage
Résultat System

PdfContentWriter() public méthode

Initializes a new instance of the PdfContentWriter class for creating a content stream of the specified form.
public PdfContentWriter ( PdfSharp.Xps.Rendering.DocumentRenderingContext context, PdfSharp.Drawing.XForm form, RenderMode renderMode ) : System
context PdfSharp.Xps.Rendering.DocumentRenderingContext
form PdfSharp.Drawing.XForm
renderMode RenderMode
Résultat System

RealizeExtGState() public méthode

Realizes the specified graphic state.
public RealizeExtGState ( PdfSharp.Pdf.Advanced.PdfExtGState xgState ) : void
xgState PdfSharp.Pdf.Advanced.PdfExtGState
Résultat void

RealizeFill() public méthode

Makes the specified brush to the current graphics object.
public RealizeFill ( PdfSharp.Xps.XpsModel.Brush brush, PdfSharp.Drawing.XForm &xform, PdfSharp.Drawing.XImage &ximage ) : void
brush PdfSharp.Xps.XpsModel.Brush
xform PdfSharp.Drawing.XForm
ximage PdfSharp.Drawing.XImage
Résultat void

RealizeFillOpacity() public méthode

Realizes the opacity for non-stroke operations.
public RealizeFillOpacity ( double opacity ) : void
opacity double
Résultat void

RealizeFont() public méthode

Makes the specified font and brush to the current graphics objects.
public RealizeFont ( PdfSharp.Xps.XpsModel.Glyphs glyphs ) : void
glyphs PdfSharp.Xps.XpsModel.Glyphs
Résultat void

RealizeStroke() public méthode

Makes the specified pen to the current graphics object.
public RealizeStroke ( PdfSharp.Xps.XpsModel.Path path ) : void
path PdfSharp.Xps.XpsModel.Path
Résultat void

RealizeStrokeOpacity() public méthode

Realizes the opacity for stroke operations.
public RealizeStrokeOpacity ( double opacity ) : void
opacity double
Résultat void

WriteClip() public méthode

Writes the specified PathGeometry as intersection with the current clip path to the content stream.
public WriteClip ( PdfSharp.Xps.XpsModel.PathGeometry geo ) : void
geo PdfSharp.Xps.XpsModel.PathGeometry
Résultat void

WriteClip() public méthode

Writes the specified rectangle as intersection with the current clip path to the content stream.
public WriteClip ( PdfSharp.Drawing.XRect rect ) : void
rect PdfSharp.Drawing.XRect
Résultat void

WriteElement() public méthode

Writes the specified element to the content stream.
public WriteElement ( XpsElement element ) : void
element XpsElement
Résultat void

WriteElements() public méthode

Writes all elements of the collection to the content stream.
public WriteElements ( XpsElementCollection elements ) : void
elements XpsElementCollection
Résultat void

WriteOpacityMask() public méthode

public WriteOpacityMask ( PdfSharp.Xps.XpsModel.Brush brush ) : void
brush PdfSharp.Xps.XpsModel.Brush
Résultat void

WriteRenderTransform() public méthode

Writes the specified transformation matrix to the content stream.
public WriteRenderTransform ( PdfSharp.Drawing.XMatrix matrix ) : void
matrix PdfSharp.Drawing.XMatrix
Résultat void

WriteRestoreState() public méthode

Restores the previous graphical state and writes a pop state operator to the content stream.
public WriteRestoreState ( string traceMessage, string elementName ) : void
traceMessage string
elementName string
Résultat void

WriteSaveState() public méthode

Saves the current graphical state and writes a push state operator to the content stream.
public WriteSaveState ( string traceMessage, string elementName ) : void
traceMessage string
elementName string
Résultat void

WriteSegment() public méthode

Writes the specified PolyLineSegment to the content stream.
public WriteSegment ( PdfSharp.Xps.XpsModel.PolyLineSegment seg ) : void
seg PdfSharp.Xps.XpsModel.PolyLineSegment
Résultat void

WriteTextTransform() public méthode

Writes the specified text transformation matrix to the content stream.
public WriteTextTransform ( PdfSharp.Drawing.XMatrix matrix ) : void
matrix PdfSharp.Drawing.XMatrix
Résultat void