Interface ICefImage

Description
Hierarchy
Fields
Methods
Properties

Unit

Declaration

type ICefImage = interface(ICefBaseRefCounted)

Description

Container for a single image represented at different scale factors. All image representations should be the same size in density independent pixel (DIP) units. For example, if the image at scale factor 1.0 is 100x100 pixels then the image at scale factor 2.0 should be 200x200 pixels – both images will display with a DIP size of 100x100 units. The functions of this interface can be called on any browser process thread.

UNKNOWN

<see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_image_capi.h">CEF source file: /include/capi/cef_image_capi.h (cef_image_t))

Hierarchy

Overview

Methods

Public function IsEmpty: Boolean;
Public function IsSame(const that: ICefImage): Boolean;
Public function AddBitmap(scaleFactor: Single; pixelWidth, pixelHeight: Integer; colorType: TCefColorType; alphaType: TCefAlphaType; const pixelData: Pointer; pixelDataSize: NativeUInt): Boolean;
Public function AddPng(scaleFactor: Single; const pngData: Pointer; pngDataSize: NativeUInt): Boolean;
Public function AddJpeg(scaleFactor: Single; const jpegData: Pointer; jpegDataSize: NativeUInt): Boolean;
Public function GetWidth: NativeUInt;
Public function GetHeight: NativeUInt;
Public function HasRepresentation(scaleFactor: Single): Boolean;
Public function RemoveRepresentation(scaleFactor: Single): Boolean;
Public function GetRepresentationInfo(scaleFactor: Single; var actualScaleFactor: Single; var pixelWidth, pixelHeight: Integer): Boolean;
Public function GetAsBitmap(scaleFactor: Single; colorType: TCefColorType; alphaType: TCefAlphaType; var pixelWidth, pixelHeight: Integer): ICefBinaryValue;
Public function GetAsPng(scaleFactor: Single; withTransparency: Boolean; var pixelWidth, pixelHeight: Integer): ICefBinaryValue;
Public function GetAsJpeg(scaleFactor: Single; quality: Integer; var pixelWidth, pixelHeight: Integer): ICefBinaryValue;

Properties

Public property Width : NativeUInt read GetWidth;
Public property Height : NativeUInt read GetHeight;

Description

Methods

Public function IsEmpty: Boolean;

Returns true (1) if this Image is NULL.

Attributes
GUID['{E2C2F424-26A2-4498-BB45-DA23219831BE}']
Public function IsSame(const that: ICefImage): Boolean;

Returns true (1) if this Image and |that| Image share the same underlying storage. Will also return true (1) if both images are NULL.

Public function AddBitmap(scaleFactor: Single; pixelWidth, pixelHeight: Integer; colorType: TCefColorType; alphaType: TCefAlphaType; const pixelData: Pointer; pixelDataSize: NativeUInt): Boolean;

Add a bitmap image representation for |scale_factor|. Only 32-bit RGBA/BGRA formats are supported. |pixel_width| and |pixel_height| are the bitmap representation size in pixel coordinates. |pixel_data| is the array of pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in size. |color_type| and |alpha_type| values specify the pixel format.

Public function AddPng(scaleFactor: Single; const pngData: Pointer; pngDataSize: NativeUInt): Boolean;

Add a PNG image representation for |scale_factor|. |png_data| is the image data of size |png_data_size|. Any alpha transparency in the PNG data will be maintained.

Public function AddJpeg(scaleFactor: Single; const jpegData: Pointer; jpegDataSize: NativeUInt): Boolean;

Create a JPEG image representation for |scale_factor|. |jpeg_data| is the image data of size |jpeg_data_size|. The JPEG format does not support transparency so the alpha byte will be set to 0xFF for all pixels.

Public function GetWidth: NativeUInt;

Returns the image width in density independent pixel (DIP) units.

Public function GetHeight: NativeUInt;

Returns the image height in density independent pixel (DIP) units.

Public function HasRepresentation(scaleFactor: Single): Boolean;

Returns true (1) if this image contains a representation for |scale_factor|.

Public function RemoveRepresentation(scaleFactor: Single): Boolean;

Removes the representation for |scale_factor|. Returns true (1) on success.

Public function GetRepresentationInfo(scaleFactor: Single; var actualScaleFactor: Single; var pixelWidth, pixelHeight: Integer): Boolean;

Returns information for the representation that most closely matches |scale_factor|. |actual_scale_factor| is the actual scale factor for the representation. |pixel_width| and |pixel_height| are the representation size in pixel coordinates. Returns true (1) on success.

Public function GetAsBitmap(scaleFactor: Single; colorType: TCefColorType; alphaType: TCefAlphaType; var pixelWidth, pixelHeight: Integer): ICefBinaryValue;

Returns the bitmap representation that most closely matches |scale_factor|. Only 32-bit RGBA/BGRA formats are supported. |color_type| and |alpha_type| values specify the desired output pixel format. |pixel_width| and |pixel_height| are the output representation size in pixel coordinates. Returns a ICefBinaryValue containing the pixel data on success or NULL on failure.

Public function GetAsPng(scaleFactor: Single; withTransparency: Boolean; var pixelWidth, pixelHeight: Integer): ICefBinaryValue;

Returns the PNG representation that most closely matches |scale_factor|. If |with_transparency| is true (1) any alpha transparency in the image will be represented in the resulting PNG data. |pixel_width| and |pixel_height| are the output representation size in pixel coordinates. Returns a ICefBinaryValue containing the PNG image data on success or NULL on failure.

Public function GetAsJpeg(scaleFactor: Single; quality: Integer; var pixelWidth, pixelHeight: Integer): ICefBinaryValue;

Returns the JPEG representation that most closely matches |scale_factor|. |quality| determines the compression level with 0 == lowest and 100 == highest. The JPEG format does not support alpha transparency and the alpha channel, if any, will be discarded. |pixel_width| and |pixel_height| are the output representation size in pixel coordinates. Returns a ICefBinaryValue containing the JPEG image data on success or NULL on failure.

Properties

Public property Width : NativeUInt read GetWidth;

Returns the image width in density independent pixel (DIP) units.

Public property Height : NativeUInt read GetHeight;

Returns the image height in density independent pixel (DIP) units.


Generated by PasDoc 0.16.0-snapshot.