API Reference
@univerjs
@univerjs/engine-render
Readme

@univerjs/engine-render v0.4.2Docs


@univerjs/engine-render

Enumerations

EnumerationDescription
BORDER_TYPE-
BreakType-
CURSOR_TYPEhttps://developer.mozilla.org/en-US/docs/Web/CSS/cursor (opens in a new tab)
CanvasRenderModecanvas render mode
DOCUMENT_CONTEXT_CLIP_TYPE-
DeviceInputEventTypeEvent Types
DeviceTypeEnum for Device Types
DocumentEditArea-
DocumentSkeletonPageType-
GlyphType-
LINK_VIEW_PORT_TYPE-
LineType-
ORIENTATION_TYPE-
ObjectType-
PageLayoutTypeDetermining the text layout, whether it's vertical or horizontal, data storage is primarily horizontal, and vertical layout is supported through rendering and drawing.
PointerInputEnum for All Pointers (Touch/Mouse)
RENDER_CLASS_TYPE-
SHAPE_TYPECopyright 2023-present DreamNum Inc.
SHEET_EXTENSION_TYPE-
SHEET_VIEWPORT_KEY-
SLIDE_NAVIGATION_KEY-
ScrollTimerType-
ShowGridlinesState-
SkeletonType-
TRANSFORM_CHANGE_OBSERVABLE_TYPE-

Classes

ClassDescription
Background-
BaseObject-
Border-
CanvasView Renderer constructor. It is a wrapper around native canvas element. Usually you don't need to use it manually.
Checkbox-
Circle-
ColumnHeaderLayoutColumn Header Bar, include a lot of columns header
ComponentExtension-
ControlCopyright 2023-present DreamNum Inc.
Custom-
CustomObject-
DashedRect-
DataStreamTreeNode-
DocBackground-
DocumentSkeleton-
DocumentViewModel-
Documents-
DrawingCopyright 2023-present DreamNum Inc.
Engine-
EventConstantsConstants used for Events
Font-
FontCache-
Group-
HitCanvasView Renderer constructor. It is a wrapper around native canvas element. Usually you don't need to use it manually.
Image-
Layer-
Liquid-
Marker-
Path-
Path2-
PerformanceMonitorPerformance monitor tracks rolling average frame-time and frame-time variance over a user defined sliding-window
Rect-
RegularPolygon-
RenderComponent-
RenderManagerService-
RenderUnitThis class is necessary for Univer to render several units in the same webpage. It encapsulates the rendering context and rendering modules for a specific unit.
RichText-
RollingAverageRollingAverage
RowHeaderLayout-
Scene-
SceneCanvasView Renderer constructor. It is a wrapper around native canvas element. Usually you don't need to use it manually.
SceneViewer-
ScrollBar-
ScrollTimer-
Shape-
SheetComponent-
SheetExtension-
Skeleton-
Slide-
Spreadsheet-
SpreadsheetColumnHeader-
SpreadsheetHeader-
SpreadsheetRowHeader-
SpreadsheetSkeleton-
ThinEngine-
ThinScene-
Transform-
UniverPrintingContext-
UniverRenderConfigServiceThis service carries managers render config that would be passed to every widget, so some rendering could be optimized.
UniverRenderEnginePluginPlug-in base class, all plug-ins must inherit from this base class. Provide basic methods.
UniverRenderingContext-
UniverRenderingContext2D-
Vector2-
Viewport-

Interfaces

InterfaceDescription
BorderCache-
BorderCacheItem-
IAdjustability-
IAfterRender$Info-
IBasicFrameInfo-
IBoundRect-
IBoundRectNoAngle-
IBounds-
ICacheItem-
IChangeObserverConfig-
ICheckboxProps-
ICircleProps-
IColumnStyleCfg-
IColumnsHeaderCfgParam-
IContext2D-
IDocSelectionInnerParam-
IDocsConfig-
IDocumentLayoutObject-
IDocumentOffsetConfig-
IDocumentSkeletonBoundingBox-
IDocumentSkeletonBullet-
IDocumentSkeletonCached-
IDocumentSkeletonColumn-
IDocumentSkeletonDivide-
IDocumentSkeletonDrawing-
IDocumentSkeletonDrawingAnchor-
IDocumentSkeletonFontStyle-
IDocumentSkeletonGlyph-
IDocumentSkeletonHeaderFooter-
IDocumentSkeletonLine-
IDocumentSkeletonPage-
IDocumentSkeletonRow-
IDocumentSkeletonSection-
IDocumentSkeletonTable-
IDragEventNative friendly interface for DragEvent Object
IDrawInfo-
IEventNative friendly interface for Event Obj ect
IExtendFrameInfo-
IExtensionConfig-
IFindNodeRestrictions-
IFontCacheItem-
IFontCreateConfig-
IFontLocale-
IFooterIds-
IHeaderIds-
IImageProps-
IKeyboardEventNative friendly interface for KeyboardEvent Object
IMeasureTextCache-
IMouseEventNative friendly interface for MouseEvent Object
INodeInfo-
INodePosition-
INodeSearch-
IObjectFullState-
IPageRenderConfig-
IPaintForRefresh-
IPaintForScrolling-
IParagraphConfig-
IParagraphTableCache-
IPathProps-
IPoint-
IPointerEventNative friendly interface for PointerEvent Object
IRectCopyright 2023-present DreamNum Inc.
IRectProps-
IRectRangeWithStyle-
IRegularPolygonProps-
IRenderPublic interface of a RenderUnit.
IRenderContextNecessary context for a render module.This interface would be the first argument of render modules' constructor functions.
IRenderManagerService-
IRenderModuleEvery render module should implement this interface.
IRichTextProps-
IRowStyleCfg-
IRowsHeaderCfgParam-
ISceneTransformStateCopyright 2023-present DreamNum Inc.
IScrollObserverParam-
ISectionBreakConfigBasics properties of doc style
IShapeProps-
ISkeletonResourceReference-
IStylesCache-
ISummaryFrameInfo-
ISummaryMetric-
ITempCellDataCell data
ITextRangeWithStyle-
ITextSelectionStyle-
ITransformChangeState-
IUIEventNative friendly interface for UIEvent Object
IViewportInfo-
IViewportInfos-
IWheelEventNative friendly interface for WheelEvent Object

Type Aliases

Type aliasDescription
DataArrayAlias for types that can be used by a Buffer or VertexBuffer.
DeepImmutableType modifier to make all the properties of an object Readonly recursively
DeepImmutableObjectType modifier to make object properties readonly.
FloatArrayAlias type for number array or Float32Array
IAColumnCfg-
IAColumnCfgObj-
IARowCfg-
IARowCfgObj-
ISuccinctDocRangeParam-
ITimeMetric-
ImmutableType modifier to make all the properties of an object Readonly
IndicesArrayAlias type for number array or Float32Array or Int32 Array or Uint32Array or Uint16Array
LineCap-
LineJoin-
PaintFirst-
RenderComponentType-
RichtextObjectJSONType-
doubleAlias type for number that are doubles.
floatAlias type for number that are floats
int-

Variables

VariableDescription
BASE_OBJECT_ARRAY-
CHECK_OBJECT_ARRAY-
CIRCLE_OBJECT_ARRAY-
COLOR_BLACK_RGB-
DEFAULT_DOCUMENT_FONTSIZE-
DEFAULT_FONTFACE_PLANE-
DEFAULT_FRAME_LIST_SIZE-
DEFAULT_FRAME_SAMPLE_SIZE-
DEFAULT_MEASURE_TEXT-
DEFAULT_OFFSET_SPACING-
DEFAULT_PADDING_DATA-
DEFAULT_SKELETON_FOOTER-
DEFAULT_SKELETON_HEADER-
DRAWING_OBJECT_LAYER_INDEX-
DRAWING_OBJECT_LOWER_LAYER_INDEX-
DRAWING_OBJECT_UPPER_LAYER_INDEX-
DocumentsSpanAndLineExtensionRegistry-
EMOJI_REG-
FIX_ONE_PIXEL_BLUR_OFFSET-
INITIAL_MATRIX-
INITIAL_Path2-
MAXIMUM_COL_WIDTH-
MAXIMUM_ROW_HEIGHT-
MIDDLE_CELL_POS_MAGIC_NUMBER-
NORMAL_TEXT_SELECTION_PLUGIN_STYLE-
PATH_OBJECT_ARRAY-
RECT_OBJECT_ARRAY-
REGULAR_POLYGON_OBJECT_ARRAY-
RENDER_RAW_FORMULA_KEY-
RICHTEXT_OBJECT_ARRAY-
SHAPE_OBJECT_ARRAY-
SHEET_EXTENSION_PREFIXfor distinguish doc & slides extensions, now only used when metric performance.
SheetColumnHeaderExtensionRegistry-
SheetRowHeaderExtensionRegistry-
SpreadsheetExtensionRegistry-
VERTICAL_ROTATE_ANGLE-

Functions

FunctionDescription
IRenderManagerService-
IRenderingEngine-
IsSafari-
calculateRectRotate-
cancelRequestFrame-
checkStyle-
clampRange-
clearLineByBorderType-
convertTextRotation-
createCanvasElement-
createImageElement-
degToRad-
drawDiagonalLineByBorderType-
drawLineByBorderType-
expandRangeIfIntersectsIf there is an intersection in ranges to the mainRanges, extend it to the first set of ranges.
fixLineWidthByScaleWhen drawing lines, it is necessary to align their precision. performance testing var time = performance.now(); for(let i=0;i<100000000;i++){ fixLineWidthByScale(i, 0.666); }; console.log(performance.now()-time);
generateRandomKey-
getCellByIndex-
getCellByIndexWithMergeInfo-
getCellPositionByIndex-
getCharSpaceApply-
getColor-
getCurrentScrollXY-
getDPI-
getDevicePixelRatio-
getDocsSkeletonPageSizeObtain the height and width of a cell's text, taking into account scenarios with rotated text.
getFontStyleString-
getGroupState-
getLastLine-
getLineOffset-
getLineWidth-
getLineWith-
getNumberUnitValue-
getOffsetRectForDom-
getPageFromPath-
getParagraphByGlyph-
getPointerPrefix-
getRotateOffsetAndFarthestHypotenuse-
getRotateOrientation-
getScale-
getSizeForDom-
getSystemHighlightColor-
getTableIdAndSliceIndex-
getTranslateInSpreadContextWithPixelRatioAlign the resolution, an alignment needs to be done in special cases where the resolution is 1.5, 1.25, etc.
getValueType-
glyphIterator-
hasAllLatin-
hasArabic-
hasBasicLatin-
hasCJK-
hasCJKPunctuation-
hasCJKText-
hasLatinExtendedA-
hasLatinExtendedB-
hasLatinOneSupplement-
hasListGlyph-
hasSpace-
hasTibetan-
hasUnMergedCellInRow-
inCurrentAndAboveViewRanges在非下方区域中
inRowViewRangesrow 在任意一个 Range 中
inViewRanges当前单元格在任意一个 viewRanges 中
injectStyle-
isArray-
isCjkCenterAlignedPunctuation-
isCjkLeftAlignedPunctuation-
isCjkRightAlignedPunctuation-
isDate-
isFirstGlyph-
isFunction-
isIndentByGlyph-
isLastGlyph-
isNumber-
isObject-
isPlaceholderOrSpace-
isRectIntersect-
isRegExp-
isSameLine-
isString-
lineIterator-
mergeInfoOffset-
parseDataStreamToTree-
pixelToPt-
precisionTo-
ptToMM-
ptToPixel-
ptToPx-
pxToInch-
pxToNum-
pxToPt-
radToDeg-
requestNewFrame-
setLineType-
startWithEmoji-
toPx-
transformObjectOutOfGroup-

Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.