public class SvgStyleResolver extends Object implements ICssResolver
| Modifier and Type | Field and Description |
|---|---|
static Set<IStyleInheritance> |
INHERITANCE_RULES |
| Constructor and Description |
|---|
SvgStyleResolver(INode rootNode, SvgProcessorContext context)
Creates a SvgStyleResolver.
|
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)
Resolves the styles of a node given the passed context.
|
public static final Set<IStyleInheritance> INHERITANCE_RULES
public SvgStyleResolver(InputStream defaultCssStream, SvgProcessorContext context) throws IOException
SvgStyleResolver with a given default CSS.
defaultCssStream - the default CSS
context - the processor context
IOException - if any input/output issue occurs
public SvgStyleResolver(SvgProcessorContext context)
SvgStyleResolver.
context - the processor context
public 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 from
context - the processor context
public 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)
ICssResolver
resolveStyles in interface ICssResolver
element - the node
context - the CSS context (RootFontSize, etc.)
public Map<String,String> resolveNativeStyles(INode node, AbstractCssContext cssContext)
node - the node
cssContext - the CSS context (RootFontSize, etc.)
public List<CssFontFaceRule> getFonts()
CssFontFaceRule instances
Copyright © 1998–2022 iText Group NV. All rights reserved.