渲染上下文

### Hierarchy

- RenderContext

## Index

### Constructors

- constructor

### Properties

- _rotation
- _scaleX
- _scaleY
- autoAdjustSize
- canvas
- canvasContext
- designHeight
- designWidth
- dirtyFieldTriggerLock
- engine
- modifyCanvasSize
- onUpdateScale
- scaleMode
- shortcutCanvas
- stageHeight
- stageWidth

### Accessors

- context
- rotation
- scaleX
- scaleY
- stageCenter
- stageScale
- stageSize

### Methods

- clear
- onModify
- setup
- shortcut
- shortcutWithSize
- updateScaleModeSelf

## Constructors

### constructor

- new RenderContext(engine: ScillaEngine ): RenderContext

- - Defined in core/context/RenderContext.ts:102

  #### Parameters

  - ##### engine: ScillaEngine

  #### Returns RenderContext

## Properties

### Private _rotation

_rotation: number = 0

- Defined in core/context/RenderContext.ts:69

### Private _scaleX

_scaleX: number

- Defined in core/context/RenderContext.ts:67

### Private _scaleY

_scaleY: number

- Defined in core/context/RenderContext.ts:68

### autoAdjustSize

autoAdjustSize: any

- Defined in core/context/RenderContext.ts:102

是否自动调整舞台尺寸

### Protected canvas

canvas: any

- Defined in core/context/RenderContext.ts:61

### Protected canvasContext

canvasContext: any

- Defined in core/context/RenderContext.ts:62

### designHeight

designHeight: any

- Defined in core/context/RenderContext.ts:87

设计高度

### designWidth

designWidth: any

- Defined in core/context/RenderContext.ts:82

设计宽度

### Protected dirtyFieldTriggerLock

dirtyFieldTriggerLock: boolean = false

- Defined in core/context/RenderContext.ts:71

### Private engine

engine: any

- Defined in core/context/RenderContext.ts:76

### modifyCanvasSize

modifyCanvasSize: any

- Defined in core/context/RenderContext.ts:97

是否修改画布的尺寸

### Private onUpdateScale

onUpdateScale: Function

- Defined in core/context/RenderContext.ts:74

### scaleMode

scaleMode: ScaleMode

- Defined in core/context/RenderContext.ts:92

缩放模式

### Private shortcutCanvas

shortcutCanvas: any

- Defined in core/context/RenderContext.ts:73

### Protected stageHeight

stageHeight: number

- Defined in core/context/RenderContext.ts:65

### Protected stageWidth

stageWidth: number

- Defined in core/context/RenderContext.ts:64

## Accessors

### context

context:

- Defined in core/context/RenderContext.ts:172

获取渲染上下文

### rotation

rotation:

- Defined in core/context/RenderContext.ts:157

旋转

### scaleX

scaleX:

- Defined in core/context/RenderContext.ts:143

缩放x

### scaleY

scaleY:

- Defined in core/context/RenderContext.ts:150

缩放y

### stageCenter

stageCenter:

- Defined in core/context/RenderContext.ts:199

获取舞台中心

### stageScale

stageScale:

- Defined in core/context/RenderContext.ts:189

获取舞台缩放

### stageSize

stageSize:

- Defined in core/context/RenderContext.ts:179

获取舞台尺寸

## Methods

### clear

- clear(): void

- - Defined in core/context/RenderContext.ts:164

  清空渲染上下文

  #### Returns void

### Private onModify

- onModify(value: any, key: any, oldValue: any): void

- - Defined in core/context/RenderContext.ts:110

  #### Parameters

  - ##### value: any

  - ##### key: any

  - ##### oldValue: any

  #### Returns void

### setup

- setup(options?: RenderContextOption ): void

- - Defined in core/context/RenderContext.ts:120

  装配上下文

  #### Parameters

  - ##### Default value options: RenderContextOption = <RenderContextOption>{}

  #### Returns void

### shortcut

- shortcut(type?: number, params: ShortcutParams ): Promise<any>

- - Defined in core/context/RenderContext.ts:335

  截图

  #### Parameters

  - ##### Default value type: number = 0

    目标格式 0:Image, 1:DataURL

  - ##### params: ShortcutParams

  #### Returns Promise<any>

### Private shortcutWithSize

- shortcutWithSize(img: any, type: any, imgType: any, quality?: any, bounds?: Bounds, scale?: number): Promise<any>

- - Defined in core/context/RenderContext.ts:349

  #### Parameters

  - ##### img: any

  - ##### type: any

  - ##### imgType: any

  - ##### Optional quality: any

  - ##### Optional bounds: Bounds

  - ##### Default value scale: number = 1

  #### Returns Promise<any>

### Private updateScaleModeSelf

- updateScaleModeSelf(): void

- - Defined in core/context/RenderContext.ts:209

  更新缩放模式

  #### Returns void

Generated using TypeDoc