API Reference
@univerjs
@univerjs/engine-render
Readme

@univerjs/engine-render v0.1.17Docs


@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
GlyphType-
LINK_VIEW_PORT_TYPE-
LineType-
ORIENTATION_TYPE-
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)
RANGE_DIRECTION-
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-
ColumnHeaderLayout-
ComponentExtension-
ControlCopyright 2023-present DreamNum Inc.
Custom-
CustomObject-
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-
NodePositionConvertToCursor-
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 responsible
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-
TextRange-
TextSelectionRenderManager-
ThinEngine-
Transform-
UniverPrintingContext-
UniverRenderEnginePluginPlug-in base class, all plug-ins must inherit from this base class. Provide basic methods.
UniverRenderingContext-
UniverRenderingContext2D-
UniverRenderingContextWebGLTODO
UniverRenderingContextWebGPUTODO
Vector2-
Viewport-

Interfaces

InterfaceDescription
BorderCache-
BorderCacheItem-
IActiveTextRange-
IAdjustability-
IBoundRect-
IBoundRectNoAngle-
IBounds-
IChangeObserverConfig-
ICheckboxProps-
ICircleProps-
IColumnStyleCfg-
IColumnsHeaderCfgParam-
IContext2D-
IDocsConfig-
IDocumentLayoutObject-
IDocumentSkeletonBoundingBox-
IDocumentSkeletonBullet-
IDocumentSkeletonCached-
IDocumentSkeletonColumn-
IDocumentSkeletonDivide-
IDocumentSkeletonDrawing-
IDocumentSkeletonDrawingAnchor-
IDocumentSkeletonFontStyle-
IDocumentSkeletonFooter-
IDocumentSkeletonGlyph-
IDocumentSkeletonHeader-
IDocumentSkeletonHeaderFooterBase-
IDocumentSkeletonLine-
IDocumentSkeletonPage-
IDocumentSkeletonSection-
IDragEventNative friendly interface for DragEvent Object
IDrawInfo-
IEditorInputConfig-
IEventNative friendly interface for Event Obj ect
IExtensionConfig-
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-
IPathProps-
IPoint-
IPointerEventNative friendly interface for PointerEvent Object
IRectCopyright 2023-present DreamNum Inc.
IRectProps-
IRegularPolygonProps-
IRender-
IRenderContextThis object encapsulates methods or properties to render each element.
IRenderManagerService-
IRenderModule-
IRenderModuleCtor-
IRichTextProps-
IRowStyleCfg-
IRowsHeaderCfgParam-
ISceneTransformStateCopyright 2023-present DreamNum Inc.
IScrollObserverParam-
ISectionBreakConfigBasics properties of doc style
IShapeProps-
ISheetFontRenderExtension-
ISkeletonResourceReference-
IStylesCache-
ISuccinctTextRangeParam-
ITempCellDataCell data
ITextRangeWithStyle-
ITextSelectionInnerParam-
ITextSelectionRenderManager-
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-
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-
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_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_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-
SheetColumnHeaderExtensionRegistry-
SheetRowHeaderExtensionRegistry-
SpreadsheetExtensionRegistry-
TEXT_RANGE_LAYER_INDEX-
VERTICAL_ROTATE_ANGLE-

Functions

FunctionDescription
IRenderManagerService-
IRenderingEngine-
ITextSelectionRenderManager-
IsSafari-
calculateRectRotate-
cancelRequestFrame-
checkStyle-
clampRanges-
clearLineByBorderType-
convertTextRotation-
createCanvasElement-
createImageElement-
degToRad-
drawDiagonalLineByBorderType-
drawLineByBorderType-
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-
getAnchorBounding-
getCanvasOffsetByEngine-
getCellByIndex-
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-
getLineOffset-
getLineWidth-
getLineWith-
getNumberUnitValue-
getParagraphByGlyph-
getPointerPrefix-
getRotateOffsetAndFarthestHypotenuse-
getRotateOrientation-
getScale-
getSizeForDom-
getSystemHighlightColor-
getTranslateInSpreadContextWithPixelRatioAlign the resolution, an alignment needs to be done in special cases where the resolution is 1.5, 1.25, etc.
getValueType-
hasAllLatin-
hasArabic-
hasBasicLatin-
hasCJK-
hasCJKPunctuation-
hasCJKText-
hasLatinExtendedA-
hasLatinExtendedB-
hasLatinOneSupplement-
hasListGlyph-
hasSpace-
hasTibetan-
hasUnMergedCellInRowDetermine whether there are any cells in a row that are not in the merged cells, mainly used for the calculation of auto height
inCurrentAndAboveViewRanges在非下方区域中
inRowViewRangesrow 在任意一个 Range 中
inViewRanges当前单元格在任意一个 viewRanges 中
injectStyle-
isArray-
isCjkCenterAlignedPunctuation-
isCjkLeftAlignedPunctuation-
isCjkRightAlignedPunctuation-
isDate-
isFirstGlyph-
isFunction-
isIndentByGlyph-
isLastGlyph-
isNumber-
isObject-
isPlaceholderOrSpace-
isRectIntersect-
isRegExp-
isSameLine-
isString-
mergeInfoOffset-
mergeRangeIfIntersects如果 range 有相交, 那么扩展到第一组 range 中.
pixelToPt-
precisionTo-
ptToMM-
ptToPixel-
ptToPx-
pxToInch-
pxToNum-
pxToPt-
radToDeg-
requestNewFrame-
setLineType-
startWithEmoji-
toPx-
transformObjectOutOfGroup-

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