ImageObject
Kind: class
Module/package: types
SDK: pdfdancer-client-typescript 2.0.0
Declaration
class ImageObject extends BaseObject
Members
constructor
constructor(client: PDFDancer, internalId: string, type: ObjectType, position: Position): ImageObject
clearClipping
clearClipping(): Promise<boolean>
crop
crop(left: number, top: number, right: number, bottom: number): Promise<CommandResult>
Crops the image by trimming edges.
delete
delete(): Promise<boolean>
fillRegion
fillRegion(x: number, y: number, width: number, height: number, color: Color): Promise<CommandResult>
Fills a rectangular pixel region of the image with a solid color.
flip
flip(direction: FlipDirection): Promise<CommandResult>
Flips the image horizontally, vertically, or both.
flipHorizontal
flipHorizontal(): Promise<CommandResult>
flipVertical
flipVertical(): Promise<CommandResult>
fromRef
fromRef(_client: PDFDancer, objectRef: ObjectRef): ImageObject
moveTo
moveTo(x: number, y: number): Promise<boolean>
objectRef
objectRef(): ObjectRef
replace
replace(newImage: Image): Promise<CommandResult>
Replaces this image with a new image while keeping the same position.
replaceFromFile
replaceFromFile(imagePath: string): Promise<CommandResult>
rotate
rotate(angle: number): Promise<CommandResult>
Rotates the image by the specified angle.
scale
scale(factor: number): Promise<CommandResult>
Scales the image by a factor.
scaleTo
scaleTo(width: number, height: number, preserveAspectRatio?: boolean): Promise<CommandResult>
Scales the image to a target size.
setOpacity
setOpacity(opacity: number): Promise<CommandResult>
Sets the opacity/transparency of the image.
_client
_client: PDFDancer
aspectRatio
aspectRatio: number
height
height: number
internalId
internalId: string
position
position: Position
type
type: ObjectType
width
width: number