Package com.smartgwt.client.types
Enum DrawingType
- All Implemented Interfaces:
ValueEnum,Serializable,Comparable<DrawingType>,Constable
The drawing back-end a
DrawPane uses to render its draw items. Defaults to "svg", which every supported browser provides. There is normally no reason to change this, and "svg" is the better choice for almost any drawing:
- Higher quality, particularly for text and on high-DPI displays.
- Faster for incremental updates — changing a few properties touches only those elements, where bitmap drawing repaints the whole pane. On first paint the two measured about the same: for a 2,500-point scatter plot, SVG was marginally quicker than bitmap in both Chrome and Firefox.
- No size ceiling. Browsers cap <canvas> dimensions at around 65,000px, and a
DrawPanein bitmap drawing inherits that cap. SVG panes have no comparable limit. - No bitmap memory cost. A bitmap drawing spends roughly 4 to 8 bytes per pixel, so a 4000×2000 pane costs 31–61MB; the same drawing in SVG costs nothing comparable.
DrawItem.zIndex,DrawItem.bringToFront()andDrawItem.sendToBack()work for every item. In bitmap drawing on iOS,DrawLabels default to HTML rendering and those three APIs do not apply to them; setuseHTML:falseon the label to opt out.
Choose "bitmap" only for a drawing that is rebuilt wholesale far more often than it is updated in place, and that stays well inside the browser's canvas size limit.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetValue()static DrawingTypeReturns the enum constant of this type with the specified name.static DrawingType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
SVG
Scalable Vector Graphics. The default, and available in every supported browser.If this enumerated value is used in a
Component XMLfile or server-side DataSource descriptor (.ds.xml file), use the value "svg". -
BITMAP
An HTML5 <canvas> element. See the limits above.If this enumerated value is used in a
Component XMLfile or server-side DataSource descriptor (.ds.xml file), use the value "bitmap". -
VML
Vector Markup Language, an Internet Explorer technology. Retained for backwards compatibility only: Internet Explorer is not a supported browser, and no supported browser selects this back-end.If this enumerated value is used in a
Component XMLfile or server-side DataSource descriptor (.ds.xml file), use the value "vml".
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
-