public class SvgStyleResolver extends Object implements com.itextpdf.styledxmlparser.css.ICssResolver
| Modifier and Type | Field and Description |
|---|---|
static Set<com.itextpdf.styledxmlparser.css.resolve.IStyleInheritance> |
INHERITANCE_RULES |
| Constructor and Description |
|---|
SvgStyleResolver()
Deprecated.
will be removed in next major release, use
SvgStyleResolver(SvgProcessorContext) instead |
SvgStyleResolver(com.itextpdf.styledxmlparser.node.INode rootNode,
SvgProcessorContext context)
Creates a
SvgStyleResolver. |
SvgStyleResolver(InputStream defaultCssStream)
Deprecated.
will be removed in next major release, use
SvgStyleResolver(InputStream, SvgProcessorContext) instead |
SvgStyleResolver(InputStream defaultCssStream,
SvgProcessorContext context)
Creates a
SvgStyleResolver with a given default CSS. |
SvgStyleResolver(SvgProcessorContext context)
Creates a
SvgStyleResolver. |
| Modifier and Type | Method and Description |
|---|---|
List<com.itextpdf.styledxmlparser.css.CssFontFaceRule> |
getFonts()
Gets the list of fonts.
|
static boolean |
isElementNested(com.itextpdf.styledxmlparser.node.IElementNode element,
String parentElementNameForSearch) |
static void |
resolveFontSizeStyle(Map<String,String> styles,
SvgCssContext cssContext,
String parentFontSizeStr) |
Map<String,String> |
resolveNativeStyles(com.itextpdf.styledxmlparser.node.INode node,
com.itextpdf.styledxmlparser.css.resolve.AbstractCssContext cssContext)
Resolves node styles without inheritance of parent element styles.
|
Map<String,String> |
resolveStyles(com.itextpdf.styledxmlparser.node.INode element,
com.itextpdf.styledxmlparser.css.resolve.AbstractCssContext context) |
public static final Set<com.itextpdf.styledxmlparser.css.resolve.IStyleInheritance> INHERITANCE_RULES
@Deprecated public SvgStyleResolver(InputStream defaultCssStream) throws IOException
SvgStyleResolver(InputStream, SvgProcessorContext) insteadSvgStyleResolver with a given default CSS.defaultCssStream - the default CSSIOException - if any input/output issue occurs@Deprecated public SvgStyleResolver()
SvgStyleResolver(SvgProcessorContext) insteadSvgStyleResolver.public SvgStyleResolver(InputStream defaultCssStream, SvgProcessorContext context) throws IOException
SvgStyleResolver with a given default CSS.defaultCssStream - the default CSScontext - the processor contextIOException - if any input/output issue occurspublic SvgStyleResolver(SvgProcessorContext context)
SvgStyleResolver.context - the processor contextpublic SvgStyleResolver(com.itextpdf.styledxmlparser.node.INode rootNode,
SvgProcessorContext context)
SvgStyleResolver. This constructor will instantiate its internal
style sheet and it will collect the css declarations from the provided node.rootNode - node to collect css fromcontext - the processor contextpublic static void resolveFontSizeStyle(Map<String,String> styles, SvgCssContext cssContext, String parentFontSizeStr)
public static boolean isElementNested(com.itextpdf.styledxmlparser.node.IElementNode element,
String parentElementNameForSearch)
public Map<String,String> resolveStyles(com.itextpdf.styledxmlparser.node.INode element, com.itextpdf.styledxmlparser.css.resolve.AbstractCssContext context)
resolveStyles in interface com.itextpdf.styledxmlparser.css.ICssResolverpublic Map<String,String> resolveNativeStyles(com.itextpdf.styledxmlparser.node.INode node, com.itextpdf.styledxmlparser.css.resolve.AbstractCssContext cssContext)
node - the nodecssContext - the CSS context (RootFontSize, etc.)public List<com.itextpdf.styledxmlparser.css.CssFontFaceRule> getFonts()
CssFontFaceRule instancesCopyright © 1998–2021 iText Group NV. All rights reserved.