Package org.apache.fop.render.afp
Class AFPInfo
- java.lang.Object
-
- org.apache.fop.render.afp.AFPInfo
-
public final class AFPInfo extends java.lang.Object
AFP information structure for drawing the XML document.
-
-
Field Summary
Fields Modifier and Type Field Description private FontInfo
fontInfo
see AFP_FONT_INFOprivate Configuration
handlerConfiguration
see HANDLER_CONFIGURATIONprivate int
height
see HEIGHTprivate boolean
paintAsBitmap
true if SVG should be rendered as a bitmap instead of nativelyprivate AFPPaintingState
paintingState
See AFP_PAINTING_STATEprivate AFPResourceInfo
resourceInfo
See AFP_RESOURCE_INFOprivate AFPResourceManager
resourceManager
See AFP_RESOURCE_MANAGERprivate int
width
see WIDTHprivate int
x
see XPOSprivate int
y
see YPOS
-
Constructor Summary
Constructors Constructor Description AFPInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AFPGraphics2D
createGraphics2D(boolean textAsShapes)
Creates an AFPGraphics2D implementationprotected int
getBitsPerPixel()
Returns the number of bits per pixel to useFontInfo
getFontInfo()
Return the font infoConfiguration
getHandlerConfiguration()
Returns the handler configurationint
getHeight()
Returns the height.AFPPaintingState
getPaintingState()
Returns the current AFP stateprotected int
getResolution()
Returns the resolutionAFPResourceInfo
getResourceInfo()
Returns the resource informationAFPResourceManager
getResourceManager()
Returns the AFPResourceManagerint
getWidth()
Returns the width.protected int
getX()
Returns the current x position coordinateprotected int
getY()
Returns the current y position coordinateboolean
isColorSupported()
Returns true if supports colorboolean
paintAsBitmap()
Returns true if SVG should be rendered as a bitmap instead of nativelyprotected void
setFontInfo(FontInfo fontInfo)
Sets the current font infovoid
setHandlerConfiguration(Configuration cfg)
Sets the handler configurationvoid
setHeight(int height)
Sets the height.void
setPaintAsBitmap(boolean b)
Sets true if SVG should be rendered as a bitmap instead of nativelyvoid
setPaintingState(AFPPaintingState paintingState)
Sets the AFP statevoid
setResourceInfo(AFPResourceInfo resourceInfo)
Sets the resource informationvoid
setResourceManager(AFPResourceManager resourceManager)
Sets the AFPResourceManagervoid
setWidth(int width)
Sets the width.protected void
setX(int x)
Sets the current x position coordinateprotected void
setY(int y)
Sets the current y position coordinateboolean
strokeText()
Returns true if text should be stroked when paintedjava.lang.String
toString()
-
-
-
Field Detail
-
width
private int width
see WIDTH
-
height
private int height
see HEIGHT
-
x
private int x
see XPOS
-
y
private int y
see YPOS
-
handlerConfiguration
private Configuration handlerConfiguration
see HANDLER_CONFIGURATION
-
fontInfo
private FontInfo fontInfo
see AFP_FONT_INFO
-
paintingState
private AFPPaintingState paintingState
See AFP_PAINTING_STATE
-
resourceManager
private AFPResourceManager resourceManager
See AFP_RESOURCE_MANAGER
-
resourceInfo
private AFPResourceInfo resourceInfo
See AFP_RESOURCE_INFO
-
paintAsBitmap
private boolean paintAsBitmap
true if SVG should be rendered as a bitmap instead of natively
-
-
Method Detail
-
getWidth
public int getWidth()
Returns the width.- Returns:
- the width
-
setWidth
public void setWidth(int width)
Sets the width.- Parameters:
width
- The pageWidth to set
-
getHeight
public int getHeight()
Returns the height.- Returns:
- the height
-
setHeight
public void setHeight(int height)
Sets the height.- Parameters:
height
- The height to set
-
getHandlerConfiguration
public Configuration getHandlerConfiguration()
Returns the handler configuration- Returns:
- the handler configuration
-
setHandlerConfiguration
public void setHandlerConfiguration(Configuration cfg)
Sets the handler configuration- Parameters:
cfg
- the handler configuration
-
getFontInfo
public FontInfo getFontInfo()
Return the font info- Returns:
- the font info
-
getPaintingState
public AFPPaintingState getPaintingState()
Returns the current AFP state- Returns:
- the current AFP state
-
getResourceManager
public AFPResourceManager getResourceManager()
Returns the AFPResourceManager- Returns:
- the AFPResourceManager
-
isColorSupported
public boolean isColorSupported()
Returns true if supports color- Returns:
- true if supports color
-
getX
protected int getX()
Returns the current x position coordinate- Returns:
- the current x position coordinate
-
getY
protected int getY()
Returns the current y position coordinate- Returns:
- the current y position coordinate
-
getResolution
protected int getResolution()
Returns the resolution- Returns:
- the resolution
-
getBitsPerPixel
protected int getBitsPerPixel()
Returns the number of bits per pixel to use- Returns:
- the number of bits per pixel to use
-
setX
protected void setX(int x)
Sets the current x position coordinate- Parameters:
x
- the current x position coordinate
-
setY
protected void setY(int y)
Sets the current y position coordinate- Parameters:
y
- the current y position coordinate
-
setFontInfo
protected void setFontInfo(FontInfo fontInfo)
Sets the current font info- Parameters:
fontInfo
- the current font info
-
setPaintingState
public void setPaintingState(AFPPaintingState paintingState)
Sets the AFP state- Parameters:
paintingState
- the AFP state
-
setResourceManager
public void setResourceManager(AFPResourceManager resourceManager)
Sets the AFPResourceManager- Parameters:
resourceManager
- the AFPResourceManager
-
setPaintAsBitmap
public void setPaintAsBitmap(boolean b)
Sets true if SVG should be rendered as a bitmap instead of natively- Parameters:
b
- boolean value
-
paintAsBitmap
public boolean paintAsBitmap()
Returns true if SVG should be rendered as a bitmap instead of natively- Returns:
- true if SVG should be rendered as a bitmap instead of natively
-
strokeText
public boolean strokeText()
Returns true if text should be stroked when painted- Returns:
- true if text should be stroked when painted
-
setResourceInfo
public void setResourceInfo(AFPResourceInfo resourceInfo)
Sets the resource information- Parameters:
resourceInfo
- the resource information
-
getResourceInfo
public AFPResourceInfo getResourceInfo()
Returns the resource information- Returns:
- the resource information
-
createGraphics2D
public AFPGraphics2D createGraphics2D(boolean textAsShapes)
Creates an AFPGraphics2D implementation- Parameters:
textAsShapes
- true when text is painted as shapes- Returns:
- a newly created AFPGraphics2D
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-