Class ImageRenderingContext
java.lang.Object
ro.sync.exml.workspace.api.images.handlers.ImageRenderingContext
Contains information about the context in which the image will be rendered..
- Since:
- 18
-
Constructor Summary
ConstructorsConstructorDescriptionImageRenderingContext
(Font font) Constructor.ImageRenderingContext
(Font font, int dotsPerInch) Constructor.ImageRenderingContext
(Font font, int dotsPerInch, Rectangle imageInfo) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the current monitor DPI settings.getFont()
Get the font used in the place where the image will be displayed.Gets the final dimension of the image that will be painted.
-
Constructor Details
-
ImageRenderingContext
Constructor.- Parameters:
font
- The font.
-
ImageRenderingContext
Constructor.- Parameters:
font
- The font.dotsPerInch
- The current monitor DPI (Dots per Inch)
-
ImageRenderingContext
Constructor.- Parameters:
font
- The font.dotsPerInch
- The current monitor DPI (Dots per Inch)imageInfo
- Image's layout info.- Since:
- 24.0
-
-
Method Details
-
getFont
Get the font used in the place where the image will be displayed. Some image handlers (for example an SVG or a MathML image handler) might use this information to render and compute the image sizes...- Returns:
- Returns the font used in the place where the image will be displayed.
-
getDotsPerInch
public int getDotsPerInch()Get the current monitor DPI settings. The default is 96.- Returns:
- Returns the current monitor.
-
getImageDimensions
Gets the final dimension of the image that will be painted. Some image handlers (for example an SVG or a MathML image handler) might use this information to scale images without losing accuracy. If the handler does not use this information, the image is automatically scaled by the application to the display dimensions.- Returns:
- Returns The final dimensions of the image, or
null
. - Since:
- 24.0
-