public class SvgStyleResolver extends Object implements ICssResolver
| Modifier and Type | Field and Description |
|---|---|
static Set<IStyleInheritance> |
INHERITANCE_RULES |
| Constructor and Description |
|---|
SvgStyleResolver()
Deprecated.
will be removed in next major release, use
SvgStyleResolver(SvgProcessorContext) instead |
SvgStyleResolver(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<CssFontFaceRule> |
getFonts()
Gets the list of fonts.
|
static boolean |
isElementNested(IElementNode element,
String parentElementNameForSearch) |
static void |
resolveFontSizeStyle(Map<String,String> styles,
SvgCssContext cssContext,
String parentFontSizeStr) |
Map<String,String> |
resolveNativeStyles(INode node,
AbstractCssContext cssContext)
Resolves node styles without inheritance of parent element styles.
|
Map<String,String> |
resolveStyles(INode element,
AbstractCssContext context) |
public static final Set<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(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(IElementNode element, String parentElementNameForSearch)
public Map<String,String> resolveStyles(INode element, AbstractCssContext context)
resolveStyles in interface ICssResolverpublic Map<String,String> resolveNativeStyles(INode node, AbstractCssContext cssContext)
node - the nodecssContext - the CSS context (RootFontSize, etc.)public List<CssFontFaceRule> getFonts()
CssFontFaceRule instancesCopyright © 1998–2020 iText Group NV. All rights reserved.