- All Implemented Interfaces:
Serializable
,Comparable<Antialias>
,Constable
Specifies the type of antialiasing to do when rendering text or shapes.
As it is not necessarily clear from the above what advantages a particular antialias method provides, since 1.12, there is also a set of hints:
- CAIRO_ANTIALIAS_FAST : Allow the backend to degrade raster quality for speed
- CAIRO_ANTIALIAS_GOOD : A balance between speed and quality
- CAIRO_ANTIALIAS_BEST : A high-fidelity, but potentially slow, raster mode
These make no guarantee on how the backend will perform its rasterisation (if it even rasterises!), nor that they have any differing effect other than to enable some form of antialiasing. In the case of glyph rendering, CAIRO_ANTIALIAS_FAST and CAIRO_ANTIALIAS_GOOD will be mapped to CAIRO_ANTIALIAS_GRAY, with CAIRO_ANTALIAS_BEST being equivalent to CAIRO_ANTIALIAS_SUBPIXEL.
The interpretation of CAIRO_ANTIALIAS_DEFAULT is left entirely up to the backend, typically this will be similar to CAIRO_ANTIALIAS_GOOD.
- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionHint that the backend should render at the highest quality, sacrificing speed if necessaryUse the default antialiasing for the subsystem and target deviceHint that the backend should perform some antialiasing but prefer speed over qualityThe backend should balance quality against performancePerform single-color antialiasing (using shades of gray for black text on a white background, for example)Use a bilevel alpha maskPerform antialiasing by taking advantage of the order of subpixel elements on devices such as LCD panels -
Method Summary
Modifier and TypeMethodDescriptionstatic org.gnome.glib.Type
getType()
Get the CairoAntialias GTypeint
getValue()
Return the value of this enumstatic Antialias
of
(int ordinal) Returns the enum constant for the given ordinal (its position in the enum declaration).static Antialias
Returns the enum constant of this class with the specified name.static Antialias[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Use the default antialiasing for the subsystem and target device- Since:
- 1.0
-
NONE
-
GRAY
Perform single-color antialiasing (using shades of gray for black text on a white background, for example)- Since:
- 1.0
-
SUBPIXEL
Perform antialiasing by taking advantage of the order of subpixel elements on devices such as LCD panels- Since:
- 1.0
-
FAST
Hint that the backend should perform some antialiasing but prefer speed over quality- Since:
- 1.12
-
GOOD
The backend should balance quality against performance- Since:
- 1.12
-
BEST
Hint that the backend should render at the highest quality, sacrificing speed if necessary- Since:
- 1.12
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
public int getValue()Return the value of this enum- Returns:
- the value
-
of
Returns the enum constant for the given ordinal (its position in the enum declaration).- Parameters:
ordinal
- the position in the enum declaration, starting from zero- Returns:
- the enum constant for the given ordinal
-
getType
public static org.gnome.glib.Type getType()Get the CairoAntialias GType- Returns:
- the GType
-