C# Class Pinta.Core.Document

Show file Open project: PintaProject/Pinta Class Usage Examples

Public Properties

Property Type Description
PreviousSelection Pinta.Core.DocumentSelection

Public Methods

Method Description
AddNewLayer ( string name ) : Pinta.Core.UserLayer
ClampToImageSize ( Gdk r ) : Gdk.Rectangle
Clear ( ) : void
Close ( ) : void
CreateClippedContext ( ) : Context
CreateClippedContext ( bool antialias ) : Context
CreateClippedToolContext ( ) : Context
CreateClippedToolContext ( bool antialias ) : Context
CreateLayer ( ) : Pinta.Core.UserLayer
CreateLayer ( int width, int height ) : Pinta.Core.UserLayer
CreateLayer ( string name ) : Pinta.Core.UserLayer
CreateLayer ( string name, int width, int height ) : Pinta.Core.UserLayer
CreateSelectionLayer ( ) : void
CreateSelectionLayer ( int width, int height ) : void
DeleteCurrentLayer ( ) : void
DeleteLayer ( int index, bool dispose ) : void
DestroySelectionLayer ( ) : void
Document ( Gdk size ) : System
DuplicateCurrentLayer ( ) : Pinta.Core.UserLayer
FinishSelection ( ) : void
FlattenImage ( ) : void
FlipImageHorizontal ( ) : void
FlipImageVertical ( ) : void
GetClippedLayer ( int index ) : ImageSurface
GetComputedPixel ( int x, int y ) : ColorBgra

Gets the final pixel color for the given point, taking layers, opacity, and blend modes into account.

GetFlattenedImage ( ) : ImageSurface
GetLayersToPaint ( bool include_tool_layer = true ) : List
GetSelectedBounds ( bool canvasOnly ) : Gdk.Rectangle
IndexOf ( Pinta.Core.UserLayer layer ) : int
Insert ( Pinta.Core.UserLayer layer, int index ) : void
MergeCurrentLayerDown ( ) : void
MoveCurrentLayerDown ( ) : void
MoveCurrentLayerUp ( ) : void
Paste ( bool toNewLayer, int x, int y ) : void

Pastes an image from the clipboard.

ResetSelectionPaths ( ) : void
ResizeCanvas ( int width, int height, Anchor anchor, CompoundHistoryItem compoundAction ) : void

Resizes the canvas.

ResizeImage ( int width, int height ) : void
RotateImage180 ( ) : void
RotateImageCCW ( ) : void
RotateImageCW ( ) : void
Save ( bool saveAs ) : bool
SetCurrentUserLayer ( Pinta.Core.UserLayer layer ) : void
SetCurrentUserLayer ( int i ) : void
ShowClipboardEmptyDialog ( ) : void
SignalSurfaceCloned ( ) : void

Signal to the TextTool that an ImageSurface was cloned.

Protected Methods

Method Description
OnIsDirtyChanged ( ) : void
OnRenamed ( ) : void

Private Methods

Method Description
OnSelectionChanged ( ) : void
RaiseLayerPropertyChangedEvent ( object sender, PropertyChangedEventArgs e ) : void
RotateImage ( double angle ) : void

Rotates the image by the specified angle (in degrees)

ShowExpandCanvasDialog ( ) : ResponseType

Method Details

AddNewLayer() public method

public AddNewLayer ( string name ) : Pinta.Core.UserLayer
name string
return Pinta.Core.UserLayer

ClampToImageSize() public method

public ClampToImageSize ( Gdk r ) : Gdk.Rectangle
r Gdk
return Gdk.Rectangle

Clear() public method

public Clear ( ) : void
return void

Close() public method

public Close ( ) : void
return void

CreateClippedContext() public method

public CreateClippedContext ( ) : Context
return Context

CreateClippedContext() public method

public CreateClippedContext ( bool antialias ) : Context
antialias bool
return Context

CreateClippedToolContext() public method

public CreateClippedToolContext ( ) : Context
return Context

CreateClippedToolContext() public method

public CreateClippedToolContext ( bool antialias ) : Context
antialias bool
return Context

CreateLayer() public method

public CreateLayer ( ) : Pinta.Core.UserLayer
return Pinta.Core.UserLayer

CreateLayer() public method

public CreateLayer ( int width, int height ) : Pinta.Core.UserLayer
width int
height int
return Pinta.Core.UserLayer

CreateLayer() public method

public CreateLayer ( string name ) : Pinta.Core.UserLayer
name string
return Pinta.Core.UserLayer

CreateLayer() public method

public CreateLayer ( string name, int width, int height ) : Pinta.Core.UserLayer
name string
width int
height int
return Pinta.Core.UserLayer

CreateSelectionLayer() public method

public CreateSelectionLayer ( ) : void
return void

CreateSelectionLayer() public method

public CreateSelectionLayer ( int width, int height ) : void
width int
height int
return void

DeleteCurrentLayer() public method

public DeleteCurrentLayer ( ) : void
return void

DeleteLayer() public method

public DeleteLayer ( int index, bool dispose ) : void
index int
dispose bool
return void

DestroySelectionLayer() public method

public DestroySelectionLayer ( ) : void
return void

Document() public method

public Document ( Gdk size ) : System
size Gdk
return System

DuplicateCurrentLayer() public method

public DuplicateCurrentLayer ( ) : Pinta.Core.UserLayer
return Pinta.Core.UserLayer

FinishSelection() public method

public FinishSelection ( ) : void
return void

FlattenImage() public method

public FlattenImage ( ) : void
return void

FlipImageHorizontal() public method

public FlipImageHorizontal ( ) : void
return void

FlipImageVertical() public method

public FlipImageVertical ( ) : void
return void

GetClippedLayer() public method

public GetClippedLayer ( int index ) : ImageSurface
index int
return Cairo.ImageSurface

GetComputedPixel() public method

Gets the final pixel color for the given point, taking layers, opacity, and blend modes into account.
public GetComputedPixel ( int x, int y ) : ColorBgra
x int
y int
return ColorBgra

GetFlattenedImage() public method

public GetFlattenedImage ( ) : ImageSurface
return Cairo.ImageSurface

GetLayersToPaint() public method

public GetLayersToPaint ( bool include_tool_layer = true ) : List
include_tool_layer bool
return List

GetSelectedBounds() public method

public GetSelectedBounds ( bool canvasOnly ) : Gdk.Rectangle
canvasOnly bool false for the whole selection, true for the part only on our canvas
return Gdk.Rectangle

IndexOf() public method

public IndexOf ( Pinta.Core.UserLayer layer ) : int
layer Pinta.Core.UserLayer
return int

Insert() public method

public Insert ( Pinta.Core.UserLayer layer, int index ) : void
layer Pinta.Core.UserLayer
index int
return void

MergeCurrentLayerDown() public method

public MergeCurrentLayerDown ( ) : void
return void

MoveCurrentLayerDown() public method

public MoveCurrentLayerDown ( ) : void
return void

MoveCurrentLayerUp() public method

public MoveCurrentLayerUp ( ) : void
return void

OnIsDirtyChanged() protected method

protected OnIsDirtyChanged ( ) : void
return void

OnRenamed() protected method

protected OnRenamed ( ) : void
return void

Paste() public method

Pastes an image from the clipboard.
public Paste ( bool toNewLayer, int x, int y ) : void
toNewLayer bool Set to TRUE to paste into a /// new layer. Otherwise, will paste to the current layer.
x int Optional. Location within image to paste to. /// Position will be adjusted if pasted image would hang /// over right or bottom edges of canvas.
y int Optional. Location within image to paste to. /// Position will be adjusted if pasted image would hang /// over right or bottom edges of canvas.
return void

ResetSelectionPaths() public method

public ResetSelectionPaths ( ) : void
return void

ResizeCanvas() public method

Resizes the canvas.
public ResizeCanvas ( int width, int height, Anchor anchor, CompoundHistoryItem compoundAction ) : void
width int The new width of the canvas.
height int The new height of the canvas.
anchor Anchor Direction in which to adjust the canvas
compoundAction CompoundHistoryItem /// Optionally, the history item for resizing the canvas can be added to /// a CompoundHistoryItem if it is part of a larger action (e.g. pasting an image). ///
return void

ResizeImage() public method

public ResizeImage ( int width, int height ) : void
width int
height int
return void

RotateImage180() public method

public RotateImage180 ( ) : void
return void

RotateImageCCW() public method

public RotateImageCCW ( ) : void
return void

RotateImageCW() public method

public RotateImageCW ( ) : void
return void

Save() public method

public Save ( bool saveAs ) : bool
saveAs bool
return bool

SetCurrentUserLayer() public method

public SetCurrentUserLayer ( Pinta.Core.UserLayer layer ) : void
layer Pinta.Core.UserLayer
return void

SetCurrentUserLayer() public method

public SetCurrentUserLayer ( int i ) : void
i int
return void

ShowClipboardEmptyDialog() public static method

public static ShowClipboardEmptyDialog ( ) : void
return void

SignalSurfaceCloned() public method

Signal to the TextTool that an ImageSurface was cloned.
public SignalSurfaceCloned ( ) : void
return void

Property Details

PreviousSelection public property

public DocumentSelection,Pinta.Core PreviousSelection
return Pinta.Core.DocumentSelection