Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 35 additions & 19 deletions Sources/Rendering/Core/Viewport/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,37 @@ export interface vtkViewport extends vtkObject {
getActors2D(): vtkActor2D[];

/**
*
* Get the viewport background.
* @returns {RGBColor}
*/
getBackground2(): number[];
getBackground2(): RGBColor;

/**
*
* Get the viewport background.
* @returns {RGBColor}
*/
getBackground2ByReference(): number[];
getBackground2ByReference(): RGBColor;

/**
*
* Get the viewport background.
* @returns {RGBColor}
*/
getBackground(): number[];
getBackground(): RGBColor;

/**
*
* Get the viewport background.
* @returns {RGBColor}
*/
getBackgroundByReference(): number[];
getBackgroundByReference(): RGBColor;

/**
*
* Get the gradient background flag.
* @returns {Boolean}
*/
getGradientBackground(): boolean;

/**
* Get the size and origin of the viewport in display coordinates.
*/
getSize(): Size;

Expand Down Expand Up @@ -152,30 +162,36 @@ export interface vtkViewport extends vtkObject {
setBackground(background: number[]): boolean;

/**
*
* Set the viewport secondary background.
* @param {Number} r Defines the red component (between 0 and 1).
* @param {Number} g Defines the green component (between 0 and 1).
* @param {Number} b Defines the blue component (between 0 and 1).
*/
setBackground2(r: number, g: number, b: number): boolean;

/**
*
* @param {Number[]} background
* Set the viewport secondary background.
* @param {RGBColor} background
*/
setBackground2(background: number[]): boolean;
setBackground2(background: RGBColor): boolean;

/**
*
* @param {Number[]} background
* Set the viewport secondary background.
* @param {RGBColor} background
*/
setBackground2From(background: number[]): boolean;
setBackground2From(background: RGBColor): boolean;

/**
*
* @param {Number[]} background
* Set the viewport background.
* @param {RGBColor} background
*/
setBackgroundFrom(background: RGBColor): boolean;

/**
* Set the gradient background flag.
* @param {Boolean} gradientBackground
*/
setBackgroundFrom(background: number[]): boolean;
setGradientBackground(gradientBackground: boolean): boolean;

/**
* Specify the viewport for the Viewport to draw in the rendering window.
Expand Down
1 change: 1 addition & 0 deletions Sources/Rendering/Core/Viewport/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export function extend(publicAPI, model, initialValues = {}) {
macro.obj(publicAPI, model);
macro.event(publicAPI, model, 'event');

macro.setGet(publicAPI, model, ['gradientBackground']);
Comment thread
daker marked this conversation as resolved.
macro.setGetArray(publicAPI, model, ['viewport'], 4);

macro.setGetArray(publicAPI, model, ['background', 'background2'], 3);
Expand Down
Loading
Loading