iText 8.0.5 API
|
The SvgDrawContext keeps a stack of iText.Kernel.Pdf.Canvas.PdfCanvas instances, which represent all levels of XObjects that are added to the root canvas. More...
Public Member Functions |
|
SvgDrawContext (ResourceResolver resourceResolver, FontProvider fontProvider) | |
Create an instance of the context that is used to store information when converting SVG. More... |
|
virtual PdfCanvas | GetCurrentCanvas () |
Retrieves the current top of the stack, without modifying the stack. More... |
|
virtual PdfCanvas | PopCanvas () |
Retrieves the current top of the stack, thereby taking the current item off the stack. More... |
|
virtual void | PushCanvas (PdfCanvas canvas) |
Adds a iText.Kernel.Pdf.Canvas.PdfCanvas to the stack (by definition its top), for use in drawing operations. More... |
|
virtual int | Size () |
Get the current size of the stack, signifying the nesting level of the XObjects. More... |
|
virtual void | AddViewPort (Rectangle viewPort) |
Adds a viewbox to the context. More... |
|
virtual Rectangle | GetCurrentViewPort () |
Get the current viewbox. More... |
|
virtual Rectangle | GetRootViewPort () |
Get the viewbox which is the root viewport for the current document. More... |
|
virtual void | RemoveCurrentViewPort () |
Remove the currently set view box. More... |
|
virtual void | AddNamedObject (String name, ISvgNodeRenderer namedObject) |
Adds a named object to the draw context. More... |
|
virtual ISvgNodeRenderer | GetNamedObject (String name) |
Get a named object based on its name. More... |
|
virtual ResourceResolver | GetResourceResolver () |
Gets the ResourceResolver to be used during the drawing operations. More... |
|
virtual void | AddNamedObjects (IDictionary< String, ISvgNodeRenderer > namedObjects) |
* Adds a number of named object to the draw context. More... |
|
virtual FontProvider | GetFontProvider () |
Gets the FontProvider to be used during the drawing operations. More... |
|
virtual FontSet | GetTempFonts () |
Gets list of temporary fonts from @font-face. More... |
|
virtual void | SetTempFonts (FontSet tempFonts) |
Sets the FontSet. More... |
|
virtual bool | IsIdUsedByUseTagBefore (String elementId) |
Returns true when this id has been used before More... |
|
virtual void | AddUsedId (String elementId) |
Adds an ID that has been referenced by a use element. More... |
|
virtual void | RemoveUsedId (String elementId) |
Removes an ID that has been referenced by a use element. More... |
|
virtual AffineTransform | GetLastTextTransform () |
Get the text transformation that was last applied More... |
|
virtual void | SetLastTextTransform (AffineTransform newTransform) |
Set the last text transformation More... |
|
virtual float[] | GetTextMove () |
Get the stored current text move More... |
|
virtual void | ResetTextMove () |
Reset the stored text move to [0f,0f] More... |
|
virtual void | AddTextMove (float additionalMoveX, float additionalMoveY) |
Increment the stored text move More... |
|
virtual AffineTransform | GetCurrentCanvasTransform () |
Get the current canvas transformation More... |
|
virtual SvgCssContext | GetCssContext () |
Gets the SVG CSS context. More... |
|
virtual void | SetCssContext (SvgCssContext cssContext) |
Sets the SVG CSS context. More... |
|
virtual bool | PushPatternId (String patternId) |
Add pattern id to stack. More... |
|
virtual void | PopPatternId () |
Pops the last template id from the stack. More... |
|
virtual void | SetPreviousElementTextMove (float[] previousElementTextMove) |
virtual float[] | GetPreviousElementTextMove () |
The SvgDrawContext keeps a stack of iText.Kernel.Pdf.Canvas.PdfCanvas instances, which represent all levels of XObjects that are added to the root canvas.
|
inline |
Create an instance of the context that is used to store information when converting SVG.
resourceResolver | instance of iText.StyledXmlParser.Resolver.Resource.ResourceResolver |
fontProvider | instance of iText.Layout.Font.FontProvider |
|
inlinevirtual |
Adds a named object to the draw context.
Adds a named object to the draw context. These objects can then be referenced from a different tag.
name | name of the object |
namedObject | object to be referenced |
|
inlinevirtual |
* Adds a number of named object to the draw context.
* Adds a number of named object to the draw context. These objects can then be referenced from a different tag.
namedObjects | Map containing the named objects keyed to their ID strings |
|
inlinevirtual |
Increment the stored text move
additionalMoveX | horizontal value to add |
additionalMoveY | vertical value to add |
|
inlinevirtual |
Adds an ID that has been referenced by a use element.
elementId | referenced element ID |
|
inlinevirtual |
Adds a viewbox to the context.
viewPort | rectangle representing the current viewbox |
|
inlinevirtual |
Gets the SVG CSS context.
|
inlinevirtual |
Retrieves the current top of the stack, without modifying the stack.
|
inlinevirtual |
Get the current canvas transformation
|
inlinevirtual |
Get the current viewbox.
|
inlinevirtual |
Gets the FontProvider to be used during the drawing operations.
|
inlinevirtual |
Get the text transformation that was last applied
iText.Kernel.Geom.AffineTransform representing the last text transformation
|
inlinevirtual |
Get a named object based on its name.
Get a named object based on its name. If the name isn't listed, this method will return null.
name | name of the object you want to reference |
|
inlinevirtual |
Gets the ResourceResolver to be used during the drawing operations.
|
inlinevirtual |
Get the viewbox which is the root viewport for the current document.
|
inlinevirtual |
Gets list of temporary fonts from @font-face.
|
inlinevirtual |
Get the stored current text move
|
inlinevirtual |
Returns true when this id has been used before
elementId | element id to check |
|
inlinevirtual |
Retrieves the current top of the stack, thereby taking the current item off the stack.
|
inlinevirtual |
Pops the last template id from the stack.
|
inlinevirtual |
Adds a iText.Kernel.Pdf.Canvas.PdfCanvas to the stack (by definition its top), for use in drawing operations.
canvas | the new top of the stack |
|
inlinevirtual |
Add pattern id to stack.
Add pattern id to stack. Check if the id is already in the stack. If it is, then return false
and not add, if it is not - add and return true
.
patternId | pattern id |
true
if pattern id was not on the stack and was pushed; false
if it is on the stack
|
inlinevirtual |
Remove the currently set view box.
|
inlinevirtual |
Removes an ID that has been referenced by a use element.
elementId | referenced element ID |
|
inlinevirtual |
Reset the stored text move to [0f,0f]
|
inlinevirtual |
Sets the SVG CSS context.
cssContext | the SVG CSS context |
|
inlinevirtual |
Set the last text transformation
newTransform | last text transformation |
|
inlinevirtual |
Sets the FontSet.
tempFonts | font set to be used during drawing operations |
|
inlinevirtual |
Get the current size of the stack, signifying the nesting level of the XObjects.