Package com.smartgwt.client.widgets.drawing

# Class DrawPane

java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.smartgwt.client.widgets.BaseWidget
com.smartgwt.client.widgets.Canvas
com.smartgwt.client.widgets.drawing.DrawPane

All Implemented Interfaces:
  `HasAttachHandlers`, `HasHandlers`, `EventListener`, `HasVisibility`, `IsWidget`, `LogicalStructure`, `HasDrawEndHandlers`, `HasDrawStartHandlers`, `HasClearHandlers`, `HasClickHandlers`, `HasDoubleClickHandlers`, `HasDragMoveHandlers`, `HasDragRepositionMoveHandlers`, `HasDragRepositionStartHandlers`, `HasDragRepositionStopHandlers`, `HasDragResizeMoveHandlers`, `HasDragResizeStartHandlers`, `HasDragResizeStopHandlers`, `HasDragStartHandlers`, `HasDragStopHandlers`, `HasDropHandlers`, `HasDropMoveHandlers`, `HasDropOutHandlers`, `HasDropOverHandlers`, `HasFocusChangedHandlers`, `HasHoverHandlers`, `HasHoverHiddenHandlers`, `HasKeyDownHandlers`, `HasKeyPressHandlers`, `HasMouseDownHandlers`, `HasMouseMoveHandlers`, `HasMouseOutHandlers`, `HasMouseOverHandlers`, `HasMouseStillDownHandlers`, `HasMouseUpHandlers`, `HasMouseWheelHandlers`, `HasMovedHandlers`, `HasParentMovedHandlers`, `HasResizedHandlers`, `HasRightMouseDownHandlers`, `HasRuleContextChangedHandlers`, `HasScrolledHandlers`, `HasShowContextMenuHandlers`, `HasVisibilityChangedHandlers`

Direct Known Subclasses:
  `FacetChart`, `Gauge`

public class DrawPane extends Canvas implements HasDrawEndHandlers, HasDrawStartHandlers
A DrawPane is a container for drawing bitmap and vector graphics using browser's built-in freeform drawing capabilities. These include the HTML5 `<canvas>` tag and `SVG (Scalable Vector Graphics)` where available, and the `VML (Vector Markup Language)` for legacy browsers (Internet Explorer 8 and earlier).

To draw in a `DrawPane` you create `DrawLine`s, `DrawOval`s, `DrawPath`s and other `DrawItem`-based components, and place them in the `DrawPane` via `drawItems` or add them incrementally via `addDrawItem()`.

`DrawItems` support a variety of common features, such as `gradient fills`, `arrowheads`, events such as `click()` and built-in `control knobs` for end user resizing and manipulation of shapes.

Common shapes such as `rectangles`, `ovals` and `triangles` have dedicated DrawItem subclasses. For other shapes, consider:

- `DrawPath` - a multi-segment line with straight segments, defined by a series of `points`
- `DrawPolygon` - a closed shape with straight sides, defined by a series of `points`
- `DrawShape` - a multi-segment line or closed shape whose sides can be defined by a series of commands, including curved arcs

NOTE:To use the Drawing subsystem, include the Drawing module in your application by including `<inherits name="com.smartgwt.Drawing"/>` in your GWT module XML.

### Note on Coordinate Systems

There are three different coordinate systems involved when a DrawItem is drawn onto a DrawPane:

- The "local coordinate system" for a DrawItem refers to the Cartesian coordinate system in which dimensional and positional values are interpreted. For example, when a `DrawRect` is configured with left:20, top:30, width:200, and height:100, the DrawRect represents a rectangle from (20, 30) to (220, 130) in its local coordinate system. For this same DrawRect, `top` is going to be 30 even if the shape is scaled by 3x, such that the (transformed) top coordinate in the drawing coordinate system actually lies outside the visible region of the DrawPane. Similarly, no matter what rotation is applied, `top` will continue to be 30.

  Use `DrawItem.getBoundingBox()` to obtain the bounding box of the item in local coordinates. Subclass properties also typically provide data in the local coordinate system, such as `DrawRect.left`, `DrawRect.top`, `DrawRect.width`, `DrawRect.height`, `DrawPath.points`, and `DrawTriangle.points`.

  There is a local coordinate system for each DrawItem.

- The "drawing coordinate system" refers to the Cartesian coordinate system shared by all DrawItems after their local transforms, such as `DrawItem.scale` or `DrawItem.rotation`, have been applied.

  Since `DrawGroup`s pass through applied transforms to the underlying items, `DrawGroup` properties such as `DrawGroup.left`, `DrawGroup.top`, `DrawGroup.width`, and `DrawGroup.height`, represent coordinates in the drawing coordinate system, as does therefore `DrawGroup.getBoundingBox()`. The APIs `getDrawingPoint()`, `getDrawingX()`, and `getDrawingY()`, also return drawing coordinates.

  For DrawItems with no local transforms, the drawing coordinate system is identical to the local coordinate system.

- The "global coordinate system" refers to the drawing coordinate system with global DrawPane transforms `translate`, `zoomLevel` and `rotation` applied.

  Use `DrawItem.getResizeBoundingBox()` to obtain the bounding box of a `DrawItem` in global coordinates. The APIs `DrawItem.getPageLeft()` and `DrawItem.getPageTop()` reflect global coordinates rounded to the nearest pixel and offset by the page-relative coordinates of the `DrawPane`'s top left corner. (See for example `Canvas.getPageLeft()` and `Canvas.getPageTop()`.)

  With the default global transforms, the global coordinate system is identical to the drawing coordinate system.

The view port of the DrawPane is the rectangle in the global coordinate system from (0, 0) that is as wide as the DrawPane's `inner content width` and as high as the DrawPane's `inner content height`. Note: In the case of a `FacetChart` showing a `zoom chart`, the view port height is decreased by the height of the zoom chart.

One other coordinate system in use by a DrawPane when `drag-scrolling` is enabled is the "viewbox coordinate system". The viewbox coordinate system is the drawing coordinate system with the `translate` and `rotation` transforms applied. Use `drawingWidth` and `drawingHeight` to control how much of the viewbox is available while panning.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `DrawPane.InvalidDrawingTypeException`

  ## Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

  `UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled`

- ## Field Summary

  ### Fields inherited from class com.smartgwt.client.widgets.BaseWidget

  `config, configOnly, factoryCreated, factoryProperties, id, nativeObject, scClassName`

  ### Fields inherited from class com.google.gwt.user.client.ui.UIObject

  `DEBUG_ID_PREFIX`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DrawPane()`
  `DrawPane(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `HandlerRegistration`
  `addDrawEndHandler(DrawEndHandler handler)`
  Add a drawEnd handler.
  `void`
  `addDrawItem(DrawItem item, boolean autoDraw)`
  Adds a draw item to this `DrawPane`.
  `HandlerRegistration`
  `addDrawStartHandler(DrawStartHandler handler)`
  Add a drawStart handler.
  `String`
  `addGradient(Gradient gradient)`
  Add a new gradient to the drawPane shared gradient list (`gradients`).
  `static double`
  `bezier(double p1, double cp1, double cp2, double p2, double t)`
  Computes a cubic Bézier curve polynomial: `B(t) = (1 - t)3P1 + 3(1 - t)2tCP1 + 3(1 - t)t2CP2 + t3P2`
  `static double[]`
  `bezierExtrema(double p1, double cp1, double cp2, double p2)`
  Computes the minimum and maximum value of the cubic Bézier curve polynomial defined in `bezier()`, for `0 ≤ t ≤ 1`.
  `static void`
  `changeAutoChildDefaults(String autoChildName, Canvas defaults)`
  Changes the defaults for Canvas AutoChildren named `autoChildName`.
  `static void`
  `changeAutoChildDefaults(String autoChildName, FormItem defaults)`
  Changes the defaults for FormItem AutoChildren named `autoChildName`.
  `protected JavaScriptObject`
  `create()`
  `String`
  `createLinearGradient(String id, LinearGradient linearGradient)`
  Deprecated.
  in favor of `addGradient()`
  `String`
  `createRadialGradient(String id, RadialGradient radialGradient)`
  Deprecated.
  in favor of `addGradient()`
  `String`
  `createSimpleGradient(String id, SimpleGradient simple)`
  Deprecated.
  in favor of `addGradient()`
  `void`
  `destroyItems()`
  Permanently `destroy` all DrawItems currently associated with this DrawPane, leaving the DrawPane itself intact
  `void`
  `erase()`
  Call `DrawItem.erase()` on all DrawItems currently associated with the DrawPane.
  `static double[]`
  `getBezierBoundingBox(Point p1, Point cp1, Point cp2, Point p2)`
  Calculate the bounding box of the cubic Bézier curve with endpoints `p1` and `p2` and control points `cp1` and `cp2`.
  `boolean`
  `getCanDragScroll()`
  Can the user drag-scroll the DrawPane?
  `String`
  `getDataURL()`
  Get a "data:" URL encoding the current contents of the `DrawPane`.
  `String`
  `getDataURL(DataURLCallback callback)`
  See `getDataURL()`
  `String`
  `getDataURL(DataURLCallback callback, DataURLFormat format)`
  Get a "data:" URL encoding the current contents of the `DrawPane`.
  `int`
  `getDrawingHeight()`
  When `canDragScroll` is enabled, this is the height of the area in viewbox coordinates that can be accessed through drag-scrolling.
  `Point`
  `getDrawingPoint()`
  Returns the point of the last event in the `drawing coordinate system`.
  `DrawingType`
  `getDrawingType()`
  Which type of drawing back-end should be used by this `DrawPane`? A default drawing back-end is automatically selected based on the browser.
  `int`
  `getDrawingWidth()`
  When `canDragScroll` is enabled, this is the width of the area in viewbox coordinates that can be accessed through drag-scrolling.
  `int`
  `getDrawingX()`
  Returns the X coordinate in the `drawing coordinate system` of the last event.
  `int`
  `getDrawingY()`
  Returns the Y coordinate in the `drawing coordinate system` of the last event.
  `DrawItem[]`
  `getDrawItems()`
  Array of DrawItems to initially display in this DrawPane.
  `String`
  `getEditProxyConstructor()`
  Default class used to construct the `EditProxy` for this component when the component is `first placed into edit mode`.
  `Gradient`
  `getGradient(String gradientID)`
  Returns gradient for gradientID.
  `Gradient[]`
  `getGradients()`
  Array of gradients that can be referenced by DrawItems placed on this DrawPane.
  `LogicalStructureObject`
  `getLogicalStructure()`
  Getter implementing the `LogicalStructure` interface, which supports Eclipse's logical structure debugging facility.
  `static DrawPane`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `static Point[]`
  `getPolygonPoints(int width, int height, int xc, int yc, double[] angles)`
  Computes an array of Points for a polygon that has an equal distance from its center to any of its vertices and that fits in the given width and height.
  `String`
  `getPrintHTML(PrintProperties printProperties, PrintHTMLCallback callback)`
  Retrieves printable HTML for this component and all printable subcomponents.
  `static Point[]`
  `getRegularPolygonPoints(int n, int width, int height, int xc, int yc, double startAngle)`
  Calls `getPolygonPoints()` with angles spread evenly over the full 360 degrees.
  `float`
  `getRotation()`
  Deprecated.
  `GwtFloatVsDouble`
  `double`
  `getRotationAsDouble()`
  Rotation in degrees for the `DrawPane` as a whole about the center of the `DrawPane`.
  `String`
  `getSvgString()`
  Converts this DrawPane to the source of an `<svg>` element equivalent to the current drawing.
  `int[]`
  `getTranslate()`
  Global translation.
  `Canvas`
  `getUnderlyingGWTCanvas()`
  Returns the GWT Canvas underlying this DrawPane.
  `double[]`
  `getViewPortRectInViewBoxCoords()`
  Returns the rectangle defining the drawPane's viewport (where content can be shown) in the viewbox coordinate system (see the "Note on Coordinate Systems" in the documentation for `DrawPane`).
  `float`
  `getZoomLevel()`
  Deprecated.
  `GwtFloatVsDouble`
  `double`
  `getZoomLevelAsDouble()`
  Zoom for the `DrawPane` as a whole, where 1 is normal size.
  `void`
  `refreshNow()`
  Immediately draws or redraws any items of this `DrawPane` that are scheduled to be drawn or redrawn after a delay.
  `void`
  `removeGradient(String gradientID)`
  Removes gradient for gradientID.
  `void`
  `rotate(double degrees)`
  Synonym of `setRotation()`.
  `static void`
  `scaleAndCenter(int width, int height, int xc, int yc, Point... points)`
  Computes the top-, left-, bottom-, and right-most coordinates in a list of points, then translates and scales all points to fit the entire shape into the given width and height.
  `static void`
  `scaleAndCenterBezier(int width, int height, int xc, int yc, Point startPoint, Point endPoint, Point controlPoint1, Point controlPoint2)`
  Computes the top-, left-, bottom-, and right-most coordinates containing the Bézier curve defined by `startPoint`, `controlPoint1`, `controlPoint2`, and `endPoint`, then translates and scales these four points to fit the entire curve into the given width and height.
  `void`
  `setAutoChildProperties(String autoChildName, DrawItem properties)`
  Sets the properties for creating a `DrawItem` AutoChild named `autoChildName`.
  `DrawPane`
  `setCanDragScroll(boolean canDragScroll)`
  Can the user drag-scroll the DrawPane?
  `static void`
  `setDefaultProperties(DrawPane drawPaneProperties)`
  Class level method to set the default properties of this class.
  `DrawPane`
  `setDrawingHeight(int drawingHeight)`
  When `canDragScroll` is enabled, this is the height of the area in viewbox coordinates that can be accessed through drag-scrolling.
  `DrawPane`
  `setDrawingType(DrawingType drawingType)`
  Which type of drawing back-end should be used by this `DrawPane`? A default drawing back-end is automatically selected based on the browser.
  `DrawPane`
  `setDrawingWidth(int drawingWidth)`
  When `canDragScroll` is enabled, this is the width of the area in viewbox coordinates that can be accessed through drag-scrolling.
  `DrawPane`
  `setDrawItems(DrawItem... drawItems)`
  Array of DrawItems to initially display in this DrawPane.
  `DrawPane`
  `setEditProxyConstructor(String editProxyConstructor)`
  Default class used to construct the `EditProxy` for this component when the component is `first placed into edit mode`.
  `DrawPane`
  `setGradients(Gradient... gradients)`
  Array of gradients that can be referenced by DrawItems placed on this DrawPane.
  `LogicalStructureObject`
  `setLogicalStructure(DrawPaneLogicalStructure s)`
  Setter implementing the `LogicalStructure` interface, which supports Eclipse's logical structure debugging facility.
  `DrawPane`
  `setRotation(double rotation)`
  Rotation in degrees for the `DrawPane` as a whole about the center of the `DrawPane`.
  `DrawPane`
  `setRotation(float rotation)`
  Deprecated.
  `GwtFloatVsDouble`
  `DrawPane`
  `setTranslate(int[] translate)`
  Global translation.
  `DrawPane`
  `setZoomLevel(double zoomLevel)`
  Zoom for the `DrawPane` as a whole, where 1 is normal size.
  `DrawPane`
  `setZoomLevel(float zoomLevel)`
  Deprecated.
  `GwtFloatVsDouble`
  `void`
  `zoom(double zoomLevel)`
  Synonym of `setZoomLevel()`.
  `void`
  `zoom(float zoomLevel)`
  Deprecated.
  `GwtFloatVsDouble`

  ### Methods inherited from class com.smartgwt.client.widgets.Canvas

  `addChild, addChild, addChild, addChild, addChild, addClearHandler, addClickHandler, addDoubleClickHandler, addDragMoveHandler, addDragRepositionMoveHandler, addDragRepositionStartHandler, addDragRepositionStopHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addDropHandler, addDropMoveHandler, addDropOutHandler, addDropOverHandler, addFocusChangedHandler, addHoverHandler, addHoverHiddenHandler, addKeyDownHandler, addKeyPressHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseStillDownHandler, addMouseUpHandler, addMouseWheelHandler, addMovedHandler, addParentMovedHandler, addPeer, addPeer, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addRuleContextChangedHandler, addScrolledHandler, addShowContextMenuHandler, addSnapAlignCandidate, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateHide, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, animateShow, animateShow, animateShow, animateShow, asSGWTComponent, blur, bringToFront, clear, clearExplicitTabIndex, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsEventTarget, containsFocus, containsPoint, containsPoint, contentsComponentConnected, dataContextChanged, dataContextCriteriaChanged, deparent, depeer, disable, doValueDictation, doVoiceCommand, enable, encloses, endBatchCreation, focus, focusAfterGroup, focusAtEnd, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAdaptiveHeightPriority, getAdaptiveWidthPriority, getAllCanvases, getAllCanvases, getAllCanvases, getAlwaysManageFocusNavigation, getAlwaysShowScrollbars, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideEffect, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeLayoutMode, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaHandleID, getAriaRole, getAriaStateDefaults, getAutoMaskComponents, getAutoParent, getAutoPopulateData, getAutoRevertStyles, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBorderRadius, getBottom, getById, getByJSObject, getByLocalId, getCanAcceptDrop, getCanAdaptHeight, getCanAdaptWidth, getCanDrag, getCanDragReposition, getCanDragResize, getCanDrop, getCanDropBefore, getCanDropContent, getCanDropFiles, getCanFocus, getCanHover, getCanSelectText, getCanvasAutoChild, getCanvasItem, getChildren, getChildrenAsStringArray, getChildrenResizeSnapAlign, getChildrenSnapAlign, getChildrenSnapCenterAlign, getChildrenSnapEdgeAlign, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getChildTabPosition, getClassName, getComponentMask, getComponentMaskDefaults, getContentElement, getContents, getContentsComponentDefaults, getContextMenu, getControlHeight, getCorrectZoomOverflow, getCursor, getDataContext, getDataContextCriteria, getDataContextCriteria, getDataPath, getDefaultHeight, getDefaultWidth, getDeferActionConversion, getDefiningProperty, getDefiningPropertyName, getDefiningPropertyNameOptions, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDisableTouchScrollingForDrag, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragMaskType, getDragMaxHeight, getDragMaxWidth, getDragMinHeight, getDragMinWidth, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragTargetAsString, getDragType, getDropTarget, getDropTargetAsString, getDropTypes, getDropTypesAsString, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEditNode, getEditProxy, getElement, getElement, getEnableWhen, getEndLine, getEventEdge, getEventEdge, getEvents, getExtraSpace, getFacetId, getFloatingScrollbars, getFormItemAutoChild, getForwardSVGeventsToObject, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupPadding, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverAutoFitMaxWidth, getHoverAutoFitMaxWidthAsString, getHoverAutoFitWidth, getHoverComponent, getHoverDelay, getHoverFocusKey, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverPersist, getHoverScreen, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapPosition, getHSnapPosition, getHtmlElement, getHtmlElementAsString, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getIsPrinting, getIsRuleScope, getIsSnapAlignCandidate, getKeepInParentRect, getLayoutAlign, getLeaveGroupLabelSpace, getLeavePageSpace, getLeft, getLeftAsString, getLocalId, getLocateByIDOnly, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getLocatorName, getMargin, getMasterCanvas, getMasterElement, getMatchElement, getMatchElementHeight, getMatchElementWidth, getMaxHeight, getMaxWidth, getMaxZoomOverflowError, getMenuConstructor, getMinHeight, getMinNonEdgeSize, getMinWidth, getMomentumScrollMinSpeed, getMouseStillDownDelay, getMouseStillDownInitialDelay, getName, getNativeAutoHideScrollbars, getNextZIndex, getNoDoubleClicks, getNoDropCursor, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getOverflow, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getPaletteDefaults, getPanelContainer, getParentCanvas, getParentCanvasAsString, getParentElement, getParentElementAsString, getPeers, getPendingMarkerStyle, getPendingMarkerVisible, getPercentBox, getPercentSource, getPersistentMatchElement, getPointerSettings, getPointerTarget, getPointerTargetAsString, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintStyleName, getPrompt, getProportionalResizeModifiers, getProportionalResizing, getReceiveScrollbarEvents, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getRuleContext, getRuleContext, getRuleScope, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowColor, getShadowDepth, getShadowHOffset, getShadowImage, getShadowOffset, getShadowSoftness, getShadowSpread, getShadowVOffset, getShareCriteria, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowFocusOutline, getShowHover, getShowHoverComponents, getShowPointer, getShowResizeBar, getShowShadow, getShowSnapGrid, getShrinkElementOnHide, getSingleDiv, getSizeMayChangeOnRedraw, getSkinImgDir, getSnapAlignCandidates, getSnapAlignCenterLineStyle, getSnapAlignEdgeLineStyle, getSnapAxis, getSnapEdge, getSnapGridLineProperties, getSnapGridStyle, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapPosition, getSnapPosition, getSnapResizeToAlign, getSnapResizeToGrid, getSnapTo, getSnapToAlign, getSnapToCenterAlign, getSnapToEdgeAlign, getSnapToGrid, getSnapVDirection, getSnapVGap, getStartLine, getStyleName, getSuppressRedraw, getTabIndex, getTestDataContext, getTestInstance, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getTopLevelComponents, getUpdateTabPositionOnDraw, getUpdateTabPositionOnReparent, getUseBackMask, getUseCSSShadow, getUseDataContextCriteria, getUseDragMask, getUseGeneratedStyles, getUseImageForSVG, getUseNativeDrag, getUseOpacityFilter, getUseTouchScrolling, getValuesManager, getValuesManagerAsString, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWhen, getVisibleWidth, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getWorkflows, getZIndex, getZIndex, handleDataContextCriteria, handleHover, hide, hideClickMask, hideClickMask, hideComponentMask, hideComponentMask, hideContextMenu, imgHTML, imgHTML, imgHTML, initComplete, intersects, isDirty, isDisabled, isFocused, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, onInit, pageScrollDown, pageScrollUp, parentResized, placeNear, placeNear, placeNear, print, print, print, print, printComponents, provideRuleContext, provideRuleContext, redraw, redraw, registerAIService, registerFontScaledPaddingStyles, removeChild, removeChild, removePeer, removePeer, removeRuleContext, removeSnapAlignCandidate, resizeAutoChildAttributes, resizeBy, resizeControls, resizeControlsTo, resizeFonts, resizeFonts, resizeFonts, resizeFontsTo, resizeIcons, resizePadding, resizePadding, resizeTo, resizeTo, resolveContentsComponent, revealChild, revealChild, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAdaptHeightByCustomizer, setAdaptiveHeightPriority, setAdaptiveWidthPriority, setAdaptWidthByCustomizer, setAlign, setAllowExternalFilters, setAlwaysManageFocusNavigation, setAlwaysShowScrollbars, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideEffect, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeLayoutMode, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAriaState, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoHeight, setAutoMaskComponents, setAutoParent, setAutoPopulateData, setAutoResizeAutoChildAttributes, setAutoResizeIcons, setAutoRevertStyles, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorderRadius, setBottom, setCanAcceptDrop, setCanAdaptHeight, setCanAdaptWidth, setCanDrag, setCanDragReposition, setCanDragResize, setCanDrop, setCanDropBefore, setCanDropContent, setCanDropFiles, setCanFocus, setCanHover, setCanSelectText, setChildren, setChildrenResizeSnapAlign, setChildrenSnapAlign, setChildrenSnapCenterAlign, setChildrenSnapEdgeAlign, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setComponentMaskDefaults, setContents, setContentsComponentDefaults, setContextMenu, setCorrectZoomOverflow, setCursor, setDataContext, setDataContextCriteria, setDataContextCriteria, setDataContextCriteria, setDataContextCriteria, setDataContextCriteria, setDataContextCriteria, setDataContextCriteria, setDataContextCriteria, setDataPath, setDefaultHeight, setDefaultNativeAutoHideScrollbars, setDefaultPageSpace, setDefaultProperties, setDefaultShowCustomScrollbars, setDefaultWidth, setDeferActionConversion, setDefiningProperty, setDefiningPropertyNameOptions, setDisabled, setDisabledCursor, setDisableTouchScrollingForDrag, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragMaskType, setDragMaxHeight, setDragMaxWidth, setDragMinHeight, setDragMinWidth, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragTarget, setDragType, setDropTarget, setDropTarget, setDropTypes, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setEditMode, setEditMode, setEditMode, setElement, setEnableWhen, setEndLine, setExtraSpace, setFacetId, setFloatingScrollbars, setForwardSVGeventsToObject, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupPadding, setGroupTitle, setHeight, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverAutoFitMaxWidth, setHoverAutoFitMaxWidth, setHoverAutoFitWidth, setHoverDelay, setHoverFocusKey, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverPersist, setHoverScreen, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlElement, setHtmlElement, setHtmlPosition, setImage, setImage, setInitHandler, setIsGroup, setIsRuleScope, setIsSnapAlignCandidate, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeaveGroupLabelSpace, setLeavePageSpace, setLeft, setLeft, setLocateByIDOnly, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLocatorName, setLocatorParent, setLocatorParent, setLogicalStructure, setMargin, setMatchElement, setMatchElementHeight, setMatchElementWidth, setMaxHeight, setMaxWidth, setMaxZoomOverflowError, setMenuConstructor, setMinHeight, setMinNonEdgeSize, setMinWidth, setMomentumScrollMinSpeed, setMouseStillDownDelay, setMouseStillDownInitialDelay, setName, setNativeAutoHideScrollbars, setNeverUseFilters, setNoDoubleClicks, setNoDropCursor, setOpacity, setOverflow, setPadding, setPageLeft, setPageTop, setPanelContainer, setParentCanvas, setParentCanvas, setParentElement, setParentElement, setPeers, setPendingMarkerStyle, setPendingMarkerVisible, setPercentBox, setPercentSource, setPersistentMatchElement, setPointerSettings, setPointerTarget, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrintStyleName, setPrompt, setProportionalResizeModifiers, setProportionalResizing, setReceiveScrollbarEvents, setRect, setRect, setRedrawOnResize, setRelativeTabPosition, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setRuleScope, setScrollbarConstructor, setScrollbarSize, setShadowColor, setShadowDepth, setShadowHOffset, setShadowImage, setShadowOffset, setShadowSoftness, setShadowSpread, setShadowVOffset, setShareCriteria, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowFocusOutline, setShowHover, setShowHoverComponents, setShowPointer, setShowResizeBar, setShowShadow, setShowSnapGrid, setShrinkElementOnHide, setSingleDiv, setSizeMayChangeOnRedraw, setSkinImgDir, setSmoothFade, setSnapAlignCandidates, setSnapAlignCenterLineStyle, setSnapAlignEdgeLineStyle, setSnapAxis, setSnapEdge, setSnapGridLineProperties, setSnapGridStyle, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToAlign, setSnapResizeToGrid, setSnapTo, setSnapToAlign, setSnapToCenterAlign, setSnapToEdgeAlign, setSnapToGrid, setSnapVDirection, setSnapVGap, setStartLine, setStyleName, setSuppressRedraw, setTabIndex, setTestDataContext, setTitle, setTooltip, setTop, setTop, setUpdateTabPositionOnDraw, setUpdateTabPositionOnReparent, setUseBackMask, setUseCSSShadow, setUseDataContextCriteria, setUseDragMask, setUseGeneratedStyles, setUseImageForSVG, setUseNativeDrag, setUseOpacityFilter, setUseTouchScrolling, setValuesManager, setValuesManager, setVisibility, setVisible, setVisibleWhen, setWidth, setWidth, setWidth, setWidth100, setWorkflows, setZIndex, shouldDragScroll, show, showClickMask, showComponentMask, showComponentMask, showNextTo, showNextTo, showNextTo, showNextTo, showPendingMarker, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, startBatchCreation, startDebuggingOverflow, stopDebuggingOverflow, subtractRects, supportsValueDictation, supportsVoiceCommands, unregisterAIService, updateChildTabPosition, updateChildTabPositions, updateEditNode, updateHover, updateHover, updateShadow, updateTabPositionForDraw, visibleAtPoint, willAcceptDrop`

  ### Methods inherited from class com.smartgwt.client.widgets.BaseWidget

  `addDrawHandler, addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, clearDynamicProperty, completeCreation, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAutoDraw, getConfig, getDOM, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hasAutoAssignedID, hasDynamicProperty, hashCode, initNativeObject, internalSetID, internalSetID, isConfigOnly, isCreated, isDrawn, isFactoryCreated, onBind, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAutoDraw, setConfig, setConfigOnly, setDefaultProperties, setDragTracker, setFactoryCreated, setID, setJavaScriptObject, setLogicalStructure, setLogicalStructure, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toString`

  ### Methods inherited from class com.google.gwt.user.client.ui.Widget

  `addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents`

  ### Methods inherited from class com.google.gwt.user.client.ui.UIObject

  `addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface com.google.gwt.event.shared.HasHandlers

  `fireEvent`

- ## Constructor Details

  - ### DrawPane

    public DrawPane()

  - ### DrawPane

    public DrawPane(JavaScriptObject jsObj)

- ## Method Details

  - ### getOrCreateRef

    public static DrawPane getOrCreateRef(JavaScriptObject jsObj)

  - ### changeAutoChildDefaults

    public static void changeAutoChildDefaults(String autoChildName, Canvas defaults)
    Changes the defaults for Canvas AutoChildren named `autoChildName`.
    Parameters:
      `autoChildName` - name of an AutoChild to customize the defaults for.
      `defaults` - Canvas defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see `SGWTProperties`.
    See Also:
      - `AutoChildUsage`

  - ### changeAutoChildDefaults

    public static void changeAutoChildDefaults(String autoChildName, FormItem defaults)
    Changes the defaults for FormItem AutoChildren named `autoChildName`.
    Parameters:
      `autoChildName` - name of an AutoChild to customize the defaults for.
      `defaults` - FormItem defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see `SGWTProperties`.
    See Also:
      - `AutoChildUsage`

  - ### create

    protected JavaScriptObject create()
    Overrides:
      `create` in class `Canvas`

  - ### setCanDragScroll

    public DrawPane setCanDragScroll(boolean canDragScroll) throws IllegalStateException
    Can the user drag-scroll the DrawPane?
    Overrides:
      `setCanDragScroll` in class `Canvas`
    Parameters:
      `canDragScroll` - New canDragScroll value. Default value is false
    Returns:
      `DrawPane` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the component has been created
    See Also:
      - `setDrawingWidth(int)`
      - `setDrawingHeight(int)`

  - ### getCanDragScroll

    public boolean getCanDragScroll()
    Can the user drag-scroll the DrawPane?
    Overrides:
      `getCanDragScroll` in class `Canvas`
    Returns:
      Current canDragScroll value. Default value is false
    See Also:
      - `getDrawingWidth()`
      - `getDrawingHeight()`

  - ### setDrawingHeight

    public DrawPane setDrawingHeight(int drawingHeight) throws IllegalStateException
    When `canDragScroll` is enabled, this is the height of the area in viewbox coordinates that can be accessed through drag-scrolling.
    Parameters:
      `drawingHeight` - New drawingHeight value. Default value is 1000
    Returns:
      `DrawPane` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the component has been created
    See Also:
      - `getViewPortRectInViewBoxCoords()`

  - ### getDrawingHeight

    public int getDrawingHeight()
    When `canDragScroll` is enabled, this is the height of the area in viewbox coordinates that can be accessed through drag-scrolling.
    Returns:
      Current drawingHeight value. Default value is 1000
    See Also:
      - `getViewPortRectInViewBoxCoords()`

  - ### setDrawingType

    public DrawPane setDrawingType(DrawingType drawingType) throws IllegalStateException
    Which type of drawing back-end should be used by this `DrawPane`? A default drawing back-end is automatically selected based on the browser.

    The `drawingType` can only be set to a drawing back-end type that is supported by the browser. It is provided for cases where the browser supports more than one drawing back-end. See the `DrawingType` documentation for the supported drawing back-ends and the list of browsers that support each type of drawing back-end.

    Note : This is an advanced setting

    Parameters:
      `drawingType` - New drawingType value. Default value is based on browser
    Returns:
      `DrawPane` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the component has been created

  - ### getDrawingType

    public DrawingType getDrawingType()
    Which type of drawing back-end should be used by this `DrawPane`? A default drawing back-end is automatically selected based on the browser.

    The `drawingType` can only be set to a drawing back-end type that is supported by the browser. It is provided for cases where the browser supports more than one drawing back-end. See the `DrawingType` documentation for the supported drawing back-ends and the list of browsers that support each type of drawing back-end.

    Returns:
      Current drawingType value. Default value is based on browser

  - ### setDrawingWidth

    public DrawPane setDrawingWidth(int drawingWidth) throws IllegalStateException
    When `canDragScroll` is enabled, this is the width of the area in viewbox coordinates that can be accessed through drag-scrolling.
    Parameters:
      `drawingWidth` - New drawingWidth value. Default value is 1000
    Returns:
      `DrawPane` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the component has been created
    See Also:
      - `getViewPortRectInViewBoxCoords()`

  - ### getDrawingWidth

    public int getDrawingWidth()
    When `canDragScroll` is enabled, this is the width of the area in viewbox coordinates that can be accessed through drag-scrolling.
    Returns:
      Current drawingWidth value. Default value is 1000
    See Also:
      - `getViewPortRectInViewBoxCoords()`

  - ### setDrawItems

    public DrawPane setDrawItems(DrawItem... drawItems) throws IllegalStateException
    Array of DrawItems to initially display in this DrawPane.
    Parameters:
      `drawItems` - New drawItems value. Default value is null
    Returns:
      `DrawPane` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the component has been created

  - ### getDrawItems

    public DrawItem[] getDrawItems()
    Array of DrawItems to initially display in this DrawPane.
    Returns:
      Current drawItems value. Default value is null

  - ### setEditProxyConstructor

    public DrawPane setEditProxyConstructor(String editProxyConstructor) throws IllegalStateException
    Default class used to construct the `EditProxy` for this component when the component is `first placed into edit mode`.
    Overrides:
      `setEditProxyConstructor` in class `Canvas`
    Parameters:
      `editProxyConstructor` - New editProxyConstructor value. Default value is "DrawPaneEditProxy"
    Returns:
      `DrawPane` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the component has been created
    See Also:
      - `SCClassName`

  - ### getEditProxyConstructor

    public String getEditProxyConstructor()
    Default class used to construct the `EditProxy` for this component when the component is `first placed into edit mode`.
    Overrides:
      `getEditProxyConstructor` in class `Canvas`
    Returns:
      Current editProxyConstructor value. Default value is "DrawPaneEditProxy"
    See Also:
      - `SCClassName`

  - ### setGradients

    public DrawPane setGradients(Gradient... gradients) throws IllegalStateException
    Array of gradients that can be referenced by DrawItems placed on this DrawPane. Each gradient must have an ID assigned to be used for reference.
    Parameters:
      `gradients` - New gradients value. Default value is null
    Returns:
      `DrawPane` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the component has been created

  - ### getGradients

    public Gradient[] getGradients()
    Array of gradients that can be referenced by DrawItems placed on this DrawPane. Each gradient must have an ID assigned to be used for reference.
    Returns:
      Current gradients value. Default value is null

  - ### setRotation

    public DrawPane setRotation(float rotation)
    Deprecated.
    `GwtFloatVsDouble`
    Rotation in degrees for the `DrawPane` as a whole about the center of the `DrawPane`. The positive direction corresponds to clockwise rotation (for example, 45 is rotation clockwise by 45 degrees and -10 is rotation counterclockwise by 10 degrees).
    If this method is called after the component has been drawn/initialized: Sets the `rotation` of the `DrawPane`.
    Parameters:
      `rotation` - the new rotation in degrees. The positive direction corresponds to clockwise rotation. Default value is 0
    Returns:
      `DrawPane` instance, for chaining setter calls

  - ### getRotation

    public float getRotation()
    Deprecated.
    `GwtFloatVsDouble`
    Rotation in degrees for the `DrawPane` as a whole about the center of the `DrawPane`. The positive direction corresponds to clockwise rotation (for example, 45 is rotation clockwise by 45 degrees and -10 is rotation counterclockwise by 10 degrees).
    Returns:
      Current rotation value. Default value is 0

  - ### setRotation

    public DrawPane setRotation(double rotation)
    Rotation in degrees for the `DrawPane` as a whole about the center of the `DrawPane`. The positive direction corresponds to clockwise rotation (for example, 45 is rotation clockwise by 45 degrees and -10 is rotation counterclockwise by 10 degrees).
    If this method is called after the component has been drawn/initialized: Sets the `rotation` of the `DrawPane`.
    Parameters:
      `rotation` - the new rotation in degrees. The positive direction corresponds to clockwise rotation. Default value is 0
    Returns:
      `DrawPane` instance, for chaining setter calls

  - ### getRotationAsDouble

    public double getRotationAsDouble()
    Rotation in degrees for the `DrawPane` as a whole about the center of the `DrawPane`. The positive direction corresponds to clockwise rotation (for example, 45 is rotation clockwise by 45 degrees and -10 is rotation counterclockwise by 10 degrees).
    Returns:
      Current rotation value. Default value is 0

  - ### setTranslate

    public DrawPane setTranslate(int[] translate) throws IllegalStateException
    Global translation. This array has two numbers. The first number is the X translation amount in pixels and the second number is the Y translation amount in pixels.
    Parameters:
      `translate` - New translate value. Default value is null
    Returns:
      `DrawPane` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the component has been created

  - ### getTranslate

    public int[] getTranslate()
    Global translation. This array has two numbers. The first number is the X translation amount in pixels and the second number is the Y translation amount in pixels.
    Returns:
      Current translate value. Default value is null

  - ### setZoomLevel

    public DrawPane setZoomLevel(float zoomLevel)
    Deprecated.
    `GwtFloatVsDouble`
    Zoom for the `DrawPane` as a whole, where 1 is normal size.
    If this method is called after the component has been drawn/initialized: Sets the zoom on this `DrawPane` to the specified magnification, maintaining the current viewport position.
    Parameters:
      `zoomLevel` - Desired zoom level as a float where `1.0` is equivalent to 100% magnification. Must be greater than 0. Default value is 1
    Returns:
      `DrawPane` instance, for chaining setter calls

  - ### getZoomLevel

    public float getZoomLevel()
    Deprecated.
    `GwtFloatVsDouble`
    Zoom for the `DrawPane` as a whole, where 1 is normal size.
    Returns:
      Current zoomLevel value. Default value is 1

  - ### setZoomLevel

    public DrawPane setZoomLevel(double zoomLevel)
    Zoom for the `DrawPane` as a whole, where 1 is normal size.
    If this method is called after the component has been drawn/initialized: Sets the zoom on this `DrawPane` to the specified magnification, maintaining the current viewport position.
    Parameters:
      `zoomLevel` - Desired zoom level as a float where `1.0` is equivalent to 100% magnification. Must be greater than 0. Default value is 1
    Returns:
      `DrawPane` instance, for chaining setter calls

  - ### getZoomLevelAsDouble

    public double getZoomLevelAsDouble()
    Zoom for the `DrawPane` as a whole, where 1 is normal size.
    Returns:
      Current zoomLevel value. Default value is 1

  - ### addDrawItem

    public void addDrawItem(DrawItem item, boolean autoDraw)
    Adds a draw item to this `DrawPane`. If already added to a `DrawPane`, the draw item is removed from its current `DrawPane` and added to this `DrawPane`.

    NOTE: For performance reasons, this `DrawPane` may draw the new item on a delay to allow multiple items to be added and drawn at one time. The `refreshNow()` API will force the item to be drawn immediately.

    Parameters:
      `item` - item to add.
      `autoDraw` - If explicitly set to false, and this drawPane is drawn, don't draw the newly added item

  - ### addGradient

    public String addGradient(Gradient gradient)
    Add a new gradient to the drawPane shared gradient list (`gradients`). If the gradient does not have an ID a new one will be assigned.
    Parameters:
      `gradient` - gradient to add
    Returns:
      the ID of the gradient (either provided or auto-assigned). See `Identifier`

  - ### createLinearGradient

    public String createLinearGradient(String id, LinearGradient linearGradient)
    Deprecated.
    in favor of `addGradient()`
    Creates a linear gradient which can be used by any DrawItem of this DrawPane. Any DrawItem's `fillGradient` can reference the gradient by the given ID.
    Parameters:
      `id` - the ID of the linear gradient. See `Identifier`
      `linearGradient` - the linear gradient
    Returns:
      id. See `Identifier`

  - ### createRadialGradient

    public String createRadialGradient(String id, RadialGradient radialGradient)
    Deprecated.
    in favor of `addGradient()`
    Creates a radial gradient which can be used by any DrawItem of this DrawPane. Any DrawItem's `fillGradient` can reference the gradient by the given ID.
    Parameters:
      `id` - the ID of the radial gradient. See `Identifier`
      `radialGradient` - the radial gradient
    Returns:
      id. See `Identifier`

  - ### createSimpleGradient

    public String createSimpleGradient(String id, SimpleGradient simple)
    Deprecated.
    in favor of `addGradient()`
    Creates a simple linear gradient which can be used by any DrawItem of this DrawPane. Any DrawItem's `fillGradient` can reference the gradient by the given ID.
    Parameters:
      `id` - the ID of the simple linear gradient. See `Identifier`
      `simple` - the simple linear gradient
    Returns:
      id. See `Identifier`

  - ### destroyItems

    public void destroyItems()
    Permanently `destroy` all DrawItems currently associated with this DrawPane, leaving the DrawPane itself intact

  - ### addDrawEndHandler

    public HandlerRegistration addDrawEndHandler(DrawEndHandler handler)
    Add a drawEnd handler.

    Called after we finish drawing to the underlying HTML5 <canvas> element of a DrawPane, after the last `DrawItem` has been drawn. Only called if the `DrawingType` is `DrawingType.BITMAP`.

    Specified by:
      `addDrawEndHandler` in interface `HasDrawEndHandlers`
    Parameters:
      `handler` - the drawEnd handler
    Returns:
      `HandlerRegistration` used to remove this handler

  - ### addDrawStartHandler

    public HandlerRegistration addDrawStartHandler(DrawStartHandler handler)
    Add a drawStart handler.

    Called when we start drawing to the underlying HTML5 <canvas> element of a DrawPane, right after the element is cleared. Only called if the `DrawingType` is `DrawingType.BITMAP`.

    Specified by:
      `addDrawStartHandler` in interface `HasDrawStartHandlers`
    Parameters:
      `handler` - the drawStart handler
    Returns:
      `HandlerRegistration` used to remove this handler

  - ### erase

    public void erase()
    Call `DrawItem.erase()` on all DrawItems currently associated with the DrawPane.

    The DrawItems will continue to exist, and you can call draw() on them to make them appear again, or `destroy` to get rid of them permanetly. Use `destroyItems()` to permanently get rid of all DrawItems.

  - ### getDataURL

    public String getDataURL()
    Get a "data:" URL encoding the current contents of the `DrawPane`.

    The returned "data:" URLs can be used anywhere a URL to an image is valid, for example, `Img.src`.

    This method will directly return the data URL on modern browsers when using <canvas>-style rendering (the default), and if there are no `DrawImage`s in this `DrawPane` that load cross-domain images.

    On legacy browers (any version of IE in "quirks" mode, all versions of IE prior to 9.0), or if there is a `DrawImage` that loads a cross-domain image, data URL generation requires a server trip and requires the Smart GWT Server to be installed with the same set of `required .jars` as are required for PDF export of charts in legacy IE. The method will return null and a callback must be passed, which fires when the data URL has been retrieved from the server.

    If the callback is passed but no server trip is required, the callback is fired immediately.

    For obtaining PNG or other image data for use in server-side processing (such as attaching to automated emails or saving to a database), see also the server-side APIs in com.isomorphic.contentexport.ImageExport.

    Note: It is recommended to pass a callback instead of relying on the method returning the data URL directly. This is because the callback will always be called with the generated data URL, whereas work-arounds for browser bugs may require asynchronous generation of the data URL, meaning that a data URL might not be returned immediately in certain browsers for certain `DrawPane` contents.

    Returns:
      the data URL if synchronously generated.
    See Also:
      - Chart Image Export Example

  - ### getDataURL

    public String getDataURL(DataURLCallback callback)
    See `getDataURL()`

  - ### getDataURL

    public String getDataURL(DataURLCallback callback, DataURLFormat format)
    Get a "data:" URL encoding the current contents of the `DrawPane`.

    The returned "data:" URLs can be used anywhere a URL to an image is valid, for example, `Img.src`.

    This method will directly return the data URL on modern browsers when using <canvas>-style rendering (the default), and if there are no `DrawImage`s in this `DrawPane` that load cross-domain images.

    On legacy browers (any version of IE in "quirks" mode, all versions of IE prior to 9.0), or if there is a `DrawImage` that loads a cross-domain image, data URL generation requires a server trip and requires the Smart GWT Server to be installed with the same set of `required .jars` as are required for PDF export of charts in legacy IE. The method will return null and a callback must be passed, which fires when the data URL has been retrieved from the server.

    If the callback is passed but no server trip is required, the callback is fired immediately.

    For obtaining PNG or other image data for use in server-side processing (such as attaching to automated emails or saving to a database), see also the server-side APIs in com.isomorphic.contentexport.ImageExport.

    Note: It is recommended to pass a callback instead of relying on the method returning the data URL directly. This is because the callback will always be called with the generated data URL, whereas work-arounds for browser bugs may require asynchronous generation of the data URL, meaning that a data URL might not be returned immediately in certain browsers for certain `DrawPane` contents.

    Parameters:
      `callback` - callback to fire when the data URL is available. The callback is called regardless of whether the data URL is also returned.
      `format` - the format of the data URL. If not specified, then `com.smartgwt.client.types.DataURLFormat#ALL` is assumed.
    Returns:
      the data URL if synchronously generated.
    See Also:
      - Chart Image Export Example

  - ### getDrawingPoint

    public Point getDrawingPoint()
    Returns the point of the last event in the `drawing coordinate system`.

    To give a concrete example, suppose that this `DrawPane` has `zoomLevel` 2 and drag-panning is not enabled (just to simplify this example). If `getOffsetX()` and `getOffsetY()` is (0, 0) (i.e. the mouse pointer is located at the top left point of this `DrawPane`), then getDrawingPoint() would return (0, 0). If getOffsetX/Y() is (20, 40), then getDrawingPoint() would return (10, 20) because when the 2× zoom level is applied, (10, 20) is translated to (20, 40) on the screen. You could, for example, create a new `DrawLine` with `startPoint` (10, 20) and when this line is drawn on screen, the position of the line's start point would be at offset (20, 40) on screen.

    Returns:
      the point in drawing coordinates of the last event.

  - ### getDrawingX

    public int getDrawingX()
    Returns the X coordinate in the `drawing coordinate system` of the last event. Note: If you need both the X and Y coordinates in the drawing coordinate system of the last event, it is more efficient to call `getDrawingPoint()` instead.

    See the documentation of `getDrawingPoint()` for a clarifying example.

    Returns:
      X coordinate in the drawing coordinate system of the last event.

  - ### getDrawingY

    public int getDrawingY()
    Returns the Y coordinate in the `drawing coordinate system` of the last event. Note: If you need both the X and Y coordinates in the drawing coordinate system of the last event, it is more efficient to call `getDrawingPoint()` instead.

    See the documentation of `getDrawingPoint()` for a clarifying example.

    Returns:
      Y coordinate in the drawing coordinate system of the last event.

  - ### getGradient

    public Gradient getGradient(String gradientID)
    Returns gradient for gradientID.
    Parameters:
      `gradientID` - ID of gradient to retrieve. See `Identifier`
    Returns:
      the gradient or null if not found
    See Also:
      - `Identifier`

  - ### getSvgString

    public String getSvgString()
    Converts this DrawPane to the source of an `<svg>` element equivalent to the current drawing.

    In Pro edition and above, the returned string can be used with `RPCManager.exportImage()` to download an image, or with server-side APIs in com.isomorphic.contentexport.ImageExport to obtain various kinds of images for further server-side processing.

    Returns:
      the source of an `<svg>` element.
    See Also:
      - Chart Image Export Example

  - ### getViewPortRectInViewBoxCoords

    public double[] getViewPortRectInViewBoxCoords()
    Returns the rectangle defining the drawPane's viewport (where content can be shown) in the viewbox coordinate system (see the "Note on Coordinate Systems" in the documentation for `DrawPane`). This can be useful for knowing what the viewport is showing, relative to the drawPane's `drawingWidth` and `drawingHeight`.
    Returns:
      top, left, width, height of the viewport in viewbox coordinates
    See Also:
      - `getDrawingWidth()`
      - `getDrawingHeight()`

  - ### refreshNow

    public void refreshNow()
    Immediately draws or redraws any items of this `DrawPane` that are scheduled to be drawn or redrawn after a delay.

    For performance reasons, this `DrawPane` may delay refreshing its display to allow for multiple draw item updates to be drawn at the same time. If this is occurring, refreshNow() will immediately refresh the display instead of refreshing the display in a timer.

  - ### removeGradient

    public void removeGradient(String gradientID)
    Removes gradient for gradientID.
    Parameters:
      `gradientID` - ID of gradient to remove. See `Identifier`
    See Also:
      - `Identifier`

  - ### rotate

    public void rotate(double degrees)
    Synonym of `setRotation()`.
    Parameters:
      `degrees` - the new rotation in degrees. The positive direction corresponds to clockwise rotation.

  - ### zoom

    public void zoom(float zoomLevel)
    Deprecated.
    `GwtFloatVsDouble`
    Synonym of `setZoomLevel()`.
    Parameters:
      `zoomLevel` - Desired zoom level as a float where `1.0` is equivalent to 100% magnification. Must be greater than 0.

  - ### zoom

    public void zoom(double zoomLevel)
    Synonym of `setZoomLevel()`.
    Parameters:
      `zoomLevel` - Desired zoom level as a float where `1.0` is equivalent to 100% magnification. Must be greater than 0.

  - ### bezier

    public static double bezier(double p1, double cp1, double cp2, double p2, double t)
    Computes a cubic Bézier curve polynomial: `B(t) = (1 - t)3P1 + 3(1 - t)2tCP1 + 3(1 - t)t2CP2 + t3P2`
    Parameters:
      `p1` - starting point coordinate
      `cp1` - first control point coordinate
      `cp2` - second control point coordinate
      `p2` - end point coordinate
      `t` - the value of the parameter of the curve, between 0 and 1
    Returns:
      the value of the polynomial `B(t)` at `t`

  - ### bezierExtrema

    public static double[] bezierExtrema(double p1, double cp1, double cp2, double p2)
    Computes the minimum and maximum value of the cubic Bézier curve polynomial defined in `bezier()`, for `0 ≤ t ≤ 1`.
    Parameters:
      `p1` - starting point coordinate
      `cp1` - first control point coordinate
      `cp2` - second control point coordinate
      `p2` - end point coordinate
    Returns:
      the minimum and maximum value of the cubic Bézier curve polynomial

  - ### getBezierBoundingBox

    public static double[] getBezierBoundingBox(Point p1, Point cp1, Point cp2, Point p2)
    Calculate the bounding box of the cubic Bézier curve with endpoints `p1` and `p2` and control points `cp1` and `cp2`.
    Parameters:
      `p1` - start point of the curve
      `cp1` - first cubic Bézier control point
      `cp2` - second cubic Bézier control point
      `p2` - end point of the curve
    Returns:
      the x1, y1, x2, y2 coordinates. The point `(x1, y1)` is the top-left point of the bounding box and the point `(x2, y2)` is the bottom-right point of the bounding box.

  - ### getPolygonPoints

    public static Point[] getPolygonPoints(int width, int height, int xc, int yc, double[] angles)
    Computes an array of Points for a polygon that has an equal distance from its center to any of its vertices and that fits in the given width and height.
    Parameters:
      `width` - width of target space
      `height` - height of target space
      `xc` - center point x
      `yc` - center point y
      `angles` - the complete list of angles (in radians) with respect to the center point at which the polygon must have vertices
    Returns:
      list of the vertices of the polygon

  - ### getRegularPolygonPoints

    public static Point[] getRegularPolygonPoints(int n, int width, int height, int xc, int yc, double startAngle)
    Calls `getPolygonPoints()` with angles spread evenly over the full 360 degrees.
    Parameters:
      `n` - the number of vertices the polygon
      `width` - width of target space
      `height` - height of target space
      `xc` - center point x
      `yc` - center point y
      `startAngle` - the angle (in radians) with respect to the center point of the first vertex of the polygon
    Returns:
      list of the vertices of the regular polygon

  - ### scaleAndCenter

    public static void scaleAndCenter(int width, int height, int xc, int yc, Point... points)
    Computes the top-, left-, bottom-, and right-most coordinates in a list of points, then translates and scales all points to fit the entire shape into the given width and height.
    Parameters:
      `width` - width of target space
      `height` - height of target space
      `xc` - center point x
      `yc` - center point y
      `points` - list of points to scale and translate

  - ### scaleAndCenterBezier

    public static void scaleAndCenterBezier(int width, int height, int xc, int yc, Point startPoint, Point endPoint, Point controlPoint1, Point controlPoint2)
    Computes the top-, left-, bottom-, and right-most coordinates containing the Bézier curve defined by `startPoint`, `controlPoint1`, `controlPoint2`, and `endPoint`, then translates and scales these four points to fit the entire curve into the given width and height.
    Parameters:
      `width` - width of target space
      `height` - height of target space
      `xc` - center point x
      `yc` - center point y
      `startPoint` - start point of the curve
      `endPoint` - end point of the curve
      `controlPoint1` - first cubic Bézier control point
      `controlPoint2` - second cubic Bézier control point

  - ### setDefaultProperties

    public static void setDefaultProperties(DrawPane drawPaneProperties)
    Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties set on the SmartGWT class instance passed to this function before its underlying SmartClient JS object was created. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.

    Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.

    Parameters:
      `drawPaneProperties` - properties that should be used as new defaults when instances of this class are created
    See Also:
      - `SGWTProperties`

  - ### setAutoChildProperties

    public void setAutoChildProperties(String autoChildName, DrawItem properties) throws IllegalStateException
    Sets the properties for creating a `DrawItem` AutoChild named `autoChildName`.

    `properties` must not have already been created (`properties.isCreated()` must be `false`).

    NOTE: Overrides at override points are not applied to the AutoChild created from `properties`; that is, if the Java `Class` of `properties` overrides a Smart GWT override point, the custom method implementation will not be called.

    Throws:
      `IllegalStateException` - if `properties` has been created.
    See Also:
      - `AutoChildUsage`

  - ### getPrintHTML

    public String getPrintHTML(PrintProperties printProperties, PrintHTMLCallback callback)
    Retrieves printable HTML for this component and all printable subcomponents.

    By default any Canvas with children will simply collect the printable HTML of its children by calling getPrintHTML() on each child that is considered `printable`.

    If overriding this method for a custom component, you should either return a String of printable HTML string directly or return null, and fire the callback (if provided).

    To return an empty print representation, return an empty string ("") rather than null.

    The `printProperties` argument, if passed, must be passed to any subcomponents on which `getPrintHTML()` is called.

    Notes on printing

    To print a `DrawPane` for export on IE8 and earlier, it is `PrintProperties` with `printForExport`:true:

         final PrintProperties pp = new PrintProperties();
         pp.setPrintForExport(true);
         final String exportHTML = drawPane.getPrintHTML(pp, null);

    Note: this is an override point.

    Overrides:
      `getPrintHTML` in class `Canvas`
    Parameters:
      `printProperties` - properties to configure printing behavior - may be null.
      `callback` - optional callback to fire. Generated HTML should be passed to the `PrintHTMLCallback.setHTML(String)` method of the callback.
    Returns:
      null if the print HTML is being generated asynchronously and/or a callback is provided; otherwise, the direct print HTML for this component (but note that returning direct print HTML is a deprecated feature).
    See Also:
      - `Printing overview and related methods`

  - ### getUnderlyingGWTCanvas

    public Canvas getUnderlyingGWTCanvas()
    Returns the GWT Canvas underlying this DrawPane. Throws an `DrawPane.InvalidDrawingTypeException` if the `DrawingType` isn't a `DrawingType.BITMAP`.

    To create a DrawItem drawn by custom GWT Canvas drawing code, you should:

    - Subclass the `DrawRect` class, setting `DrawItem.lineOpacity` to 0, and `DrawItem.eventOpaque` to true.
    - Trigger your drawing routine in a handler for the `DrawStartEvent` or `DrawEndEvent`, using this method to gain access to the GWT Canvas.
    - Limit your drawing to the DrawItem's `bounding box`.
    Returns:
      the GWT Canvas
    See Also:
      - `addDrawStartHandler(com.smartgwt.client.widgets.drawing.events.DrawStartHandler)`
      - `addDrawEndHandler(com.smartgwt.client.widgets.drawing.events.DrawEndHandler)`

  - ### setLogicalStructure

    public LogicalStructureObject setLogicalStructure(DrawPaneLogicalStructure s)
    Setter implementing the `LogicalStructure` interface, which supports Eclipse's logical structure debugging facility.

  - ### getLogicalStructure

    public LogicalStructureObject getLogicalStructure()
    Getter implementing the `LogicalStructure` interface, which supports Eclipse's logical structure debugging facility.
    Specified by:
      `getLogicalStructure` in interface `LogicalStructure`
    Overrides:
      `getLogicalStructure` in class `Canvas`