Class R.rendercontexts.DocumentContext
Extends
R.rendercontexts.HTMLElementContext.
A reference to the document.body element as a rendering context.
Aside from being The Render Engine's default rendering context, the context
is essentially a wrapper for the HTML document. Wrapping, in this way, allows
us to update not only this context, but all other contexts during an engine frame.
Defined in: documentcontext.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Create an instance of a document rendering context.
|
- Fields borrowed from class R.rendercontexts.RenderContext2D:
- FONT_ALIGN_CENTER, FONT_ALIGN_END, FONT_ALIGN_LEFT, FONT_ALIGN_RIGHT, FONT_ALIGN_START, FONT_BASELINE_ALPHABETIC, FONT_BASELINE_BOTTOM, FONT_BASELINE_HANGING, FONT_BASELINE_IDEOGRAPHIC, FONT_BASELINE_MIDDLE, FONT_BASELINE_TOP, FONT_STYLE_ITALIC, FONT_STYLE_NORMAL, FONT_STYLE_OBLIQUE, FONT_WEIGHT_BOLD, FONT_WEIGHT_LIGHT, FONT_WEIGHT_NORMAL
- Fields borrowed from class R.struct.Container:
- EMPTY
Method Attributes | Method Name and Description |
---|---|
Get the class name of this object
|
|
reset(rect)
Reset the context, clearing it and preparing it for drawing.
|
- Methods borrowed from class R.rendercontexts.HTMLElementContext:
- add, destroy, drawElement, drawFilledRectangle, drawImage, drawPoint, drawRectangle, drawSprite, drawText, popTransform, pushTransform, remove, setBackgroundColor, setHeight, setPosition, setRotation, setScale, setWidth
- Methods borrowed from class R.rendercontexts.RenderContext2D:
- arcTo, bezierCurveTo, cleanUp, drawArc, drawCircle, drawFilledArc, drawFilledCircle, drawFilledPolygon, drawFilledRegularPolygon, drawLine, drawPolygon, drawPolyline, drawRegularPolygon, endPath, fillPath, getBackgroundColor, getBoundingBox, getFillStyle, getFont, getFontAlign, getFontBaseline, getFontSize, getFontStyle, getFontWeight, getHeight, getImage, getLineStyle, getLineWidth, getNormalizedFont, getPosition, getRenderPosition, getRenderRotation, getRenderScale, getRotation, getScaleX, getScaleY, getTextMetrics, getTransform, getWidth, lineSeg, lineTo, moveTo, postRender, putImage, quadraticCurveTo, release, render, renderBin, setFillStyle, setFont, setFontAlign, setFontBaseline, setFontSize, setFontStyle, setFontWeight, setLineStyle, setLineWidth, setRenderTransform, setTransform, sort, sortFn, startPath, strokePath, swapBins
- Methods borrowed from class R.rendercontexts.AbstractRenderContext:
- captureMouse, captureTouch, getContextData, getExpandedViewport, getMouseInfo, getSurface, getTouchInfo, getViewport, getWorldBoundary, getWorldPosition, getWorldRotation, getWorldScale, isStatic, removeAtIndex, renderObject, resetTransformStack, setStatic, setSurface, setupWorld, setViewport, setWorldBoundary, setWorldPosition, setWorldRotation, setWorldScale, uncaptureMouse, uncaptureTouch, update
- Methods borrowed from class R.struct.Container:
- addAll, append, clear, clone, concat, contains, filter, forEach, fromArray, get, getAll, getObjects, getProperties, insert, iterator, reduce, replace, replaceAt, size, subset, toXML
- Methods borrowed from class R.engine.BaseObject:
- addEvent, addEvents, getElement, jQ, removeEvent, setElement, triggerEvent
- Methods borrowed from class R.engine.PooledObject:
- clearObjectDataModel, getId, getName, getObjectDataModel, isDestroyed, setName, setObjectDataModel, toString
Class Detail
R.rendercontexts.DocumentContext()
Create an instance of a document rendering context. This context
represents the HTML document body. Theoretically, only one of these
contexts should ever be created.
Method Detail
{String}
getClassName()
Get the class name of this object
- Returns:
- {String} "R.rendercontexts.DocumentContext"
reset(rect)
Reset the context, clearing it and preparing it for drawing.
- Parameters:
- rect