class ImageProcessor::TPreview |
A preview representation of the rendered image after effects and geometric operations have been applied. Has the ability to zoom and pan the output image in the supplied pixel buffer. Typically this is a low resolution representation of the image which allows effects and operations to be applied quickly to the image without needing to process the whole image.
Public Member Functions | |
---|---|
IMPORT_C void | Cancel() |
IMPORT_C TRect | CanvasAreaL() |
IMPORT_C void | CanvasToCurrentCoordL(const TPoint &, TPoint &) |
IMPORT_C CImageFrame * | CreateOutputL(const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &) |
IMPORT_C void | GetPanLevelSettings(TReal32 &, TReal32 &) |
IMPORT_C void | GetZoomLevelSettings(TReal32 &, TReal32 &) |
IMPORT_C void | InitializeL() |
IMPORT_C void | PanL(TReal32 &, TReal32 &) |
IMPORT_C TInt | PreviewId() |
IMPORT_C void | PreviewToCurrentCoordL(const TPoint &, TPoint &) |
IMPORT_C void | RenderL() |
IMPORT_C void | ResetL() |
IMPORT_C void | SetOutputL(CFbsBitmap &) |
IMPORT_C void | SetOutputL(CImageFrame &) |
IMPORT_C void | SetPanL(TReal32, TReal32) |
IMPORT_C void | SetPreviewId(TInt) |
IMPORT_C void | SetZoomL(TReal32) |
IMPORT_C TSize | SizeL() |
IMPORT_C TPreview::TState | State() |
IMPORT_C void | SupportedImageFrameFormatsL(RArray< TUid > &) |
IMPORT_C void | SupportedOutputDisplayModesL(RArray< TDisplayMode > &) |
IMPORT_C void | UninitializeL() |
IMPORT_C TReal32 | ZoomL() |
Private Member Functions | |
---|---|
TPreview(Plugin::MPreview &, CImageProcessorImpl &) | |
void | SetStateL(TPreview::TState) |
Public Member Enumerations | |
---|---|
enum | TState { EUninitialized, EInitializing, EInitialized, ERendering, EStatesCount } |
Private Attributes | |
---|---|
CImageProcessorImpl & | iImageProcessorImpl |
TBool | iIsOutputSet |
Plugin::MPreview & | iPreviewImpl |
TInt | iReserved |
TPreview::TState | iState |
const TBool | iValidStates |
TPreview | ( | Plugin::MPreview & | aPreviewImpl, |
CImageProcessorImpl & | aImageProcessorImpl | ||
) | [private] |
Plugin::MPreview & aPreviewImpl | |
CImageProcessorImpl & aImageProcessorImpl |
IMPORT_C void | Cancel | ( | ) |
Cancels the preview rendering if the preview state is EInitializing or ERendering, unconditionally aborts the operation.
IMPORT_C TRect | CanvasAreaL | ( | ) | const |
Gets the current canvas as TRect in the given screen
The current canvas of the preview screen.
leave
KErrNotReady The current state is EUninitialized.
leave
Other A range of system wide error codes.
IMPORT_C void | CanvasToCurrentCoordL | ( | const TPoint & | aCanvasPoint, |
TPoint & | aCurrentPoint | |||
) | const |
Converts a coordinate from canvas to current coordinate system.
leave
KErrNotReady The current state is EUninitialized.
leave
Other A range of system wide error codes.
IMPORT_C CImageFrame * | CreateOutputL | ( | const TSize & | aFrameSize, |
const TFrameFormatBase & | aFrameFormat, | |||
const TFrameLayoutBase & | aFrameLayout | |||
) |
Creates an internal pixel buffer for output. Internal buffer size is calculated using aPixelBuffer properties (size, scanline length, display mode).
leave
KErrNotReady The current state is not EInitialized or the ImageProcessor is busy
leave
Other A range of system wide error codes.
CImageFrame instance containing newly created pixel buffer. The image frame is owned by the client and deleting it does not delete the pixel buffer which is owned by the image processor framework. The pixel buffer becomes invalid if TPreview::CreateOutputL(const TSize &aFrameSize, const TFrameFormatBase &aFrameFormat, const TFrameLayoutBase &aFrameLayout) or TPreview::SetOutputL(CFbsBitmap& aBitmap) or TPreview::SetOutputL(CImageFrame& aPixelBuffer) calls are made.
const TSize & aFrameSize | A reference to a TSize object that defines the frame size in pixels of the CImageFrame object. |
const TFrameFormatBase & aFrameFormat | A reference to a TFrameFormatBase object that defines the format of the CImageFrame object. |
const TFrameLayoutBase & aFrameLayout | A reference to a TFrameLayoutBase object that defines the memory layout of the CImageFrame object. |
IMPORT_C void | GetPanLevelSettings | ( | TReal32 & | aMinimumLevel, |
TReal32 & | aMaximumLevel | |||
) |
Retrieves the pan level range.
IMPORT_C void | GetZoomLevelSettings | ( | TReal32 & | aMinimumLevel, |
TReal32 & | aMaximumLevel | |||
) |
Retrieves the zoom level range.
IMPORT_C void | InitializeL | ( | ) |
Initializes the preview.
leave
KErrNorReady if preview is not in state TPreview::EUninitialized
leave
A range of system wide error code.
IMPORT_C void | PanL | ( | TReal32 & | aPanX, |
TReal32 & | aPanY | |||
) | const |
Gets the current pan factor of the preview screen.
leave
KErrNotReady The current state is EUninitialized or the ImageProcessor is busy.
leave
Other A range of system wide error codes.
IMPORT_C void | PreviewToCurrentCoordL | ( | const TPoint & | aPreviewPoint, |
TPoint & | aCurrentPoint | |||
) | const |
Converts a coordinate from preview screen to current coordinate system.
leave
KErrNotReady The current state is EUninitialized.
leave
Other A range of system wide error codes.
IMPORT_C void | RenderL | ( | ) |
Starts the rendering. The preview state is set to ERendering
leave
KErrNotReady The current state is not EInitialized or the ImageProcessor is busy or input is not set or output is not set.
leave
Other A range of system wide error codes.
IMPORT_C void | SetOutputL | ( | CFbsBitmap & | aBitmap | ) |
Sets CFbsBitmap as the output bitmap of the preview.
leave
KErrNotReady The current state is not EInitialized or the ImageProcessor is busy
leave
A range of system wide error codes
CFbsBitmap & aBitmap | The output bitmap |
IMPORT_C void | SetOutputL | ( | CImageFrame & | aPixelBuffer | ) |
Sets an image frame as the output bitmap of the preview.
leave
KErrNotReady The current state is not EInitialized or the ImageProcessor is busy
leave
Other A range of system wide error codes.
CImageFrame & aPixelBuffer | The CImageFrame buffer. |
IMPORT_C void | SetPanL | ( | TReal32 | aPanX, |
TReal32 | aPanY | |||
) |
Specifies the pan factor for the preview screen. The zoomed screen will be panned to the new coordinate after rendering.
leave
KErrNotReady The current state is not EInitialized or the ImageProcessor is busy
leave
KErrArgument The pan factor is out of range.
leave
Other A range of system wide error codes.
IMPORT_C void | SetPreviewId | ( | TInt | aPreviewId | ) |
Specifies the id of the preview.
TInt aPreviewId | The id of the current preview |
void | SetStateL | ( | TPreview::TState | aState | ) | [private] |
TPreview::TState aState |
IMPORT_C void | SetZoomL | ( | TReal32 | aZoom | ) |
Specifies the zoom factor for the preview screen. The screen will be zoomed after rendering.
leave
KErrNotReady The current state is not EInitialized or the ImageProcessor is busy.
leave
Other A range of system wide error codes.
TReal32 aZoom | The zoom factor for the current preview, 1.0f to infinite. |
IMPORT_C TSize | SizeL | ( | ) | const |
Gets the current size of the preview screen.
The current size of the preview screen.
leave
KErrNotReady The current state is EUninitialized.
leave
Other A range of system wide error codes.
IMPORT_C TPreview::TState | State | ( | ) | const |
Gets the current state of the preview.
The current state of the preview.
IMPORT_C void | SupportedImageFrameFormatsL | ( | RArray< TUid > & | aFormats | ) | const |
Gets the supported output formats for the preview.
The supported output image formats.
IMPORT_C void | SupportedOutputDisplayModesL | ( | RArray< TDisplayMode > & | aDisplayModes | ) | const |
Gets the supported output display modes for the preview.
The supported output display modes.
RArray< TDisplayMode > & aDisplayModes |
IMPORT_C void | UninitializeL | ( | ) |
Uninitializes the preview.
leave
KErrNotReady The current state is not EInitialized or the ImageProcessor is busy
leave
Other A range of system wide error codes.
IMPORT_C TReal32 | ZoomL | ( | ) | const |
Gets the current zoom factor of the preview screen.
The current zoom factor of the preview screen.
leave
KErrNotReady The current state is EUninitialized or the ImageProcessor is busy.
leave
Other A range of system wide error codes.
The state of the preview screen
EUninitialized |
State means the preview has not been initialized, need to call InitializeL() to initialize |
EInitializing |
State means the preview is being initialized by async call of InitializeL() |
EInitialized |
State means the initialize process has finished and preview is available to be rendered |
ERendering |
State means the preview is being rendered by async call of RenderL() |
EStatesCount |
Count of valid preview states (boundary marker - not a true state). |