#include <imageprocessor/imageprocessorpreview.h>
Link against: imageprocessor.lib
class ImageProcessor::TPreview |
Public Member Enumerations | |
---|---|
enum | TState { EUninitialized, EInitializing, EInitialized, ERendering, EStatesCount } |
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() |
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.
The state of the preview screen
Enumerator | Value | Description |
---|---|---|
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). |
IMPORT_C void | Cancel | ( | ) |
Cancels the preview rendering if the preview state is EInitializing or ERendering, unconditionally aborts the operation.
Converts a coordinate from canvas to current coordinate system.
Parameters | |
---|---|
aCanvasPoint | A TPoint pointer specifying a screen in which the canvas from which to convert the coordinate is located. |
aCurrentPoint | Pointer to a TPoint object with the coordinate to convert. The converted coordinate is stored back into the object. |
Leave Codes | |
---|---|
KErrNotReady | The current state is EUninitialized. |
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).
Parameters | |
---|---|
aFrameSize | A reference to a TSize object that defines the frame size in pixels of the CImageFrame object. |
aFrameFormat | A reference to a TFrameFormatBase object that defines the format of the CImageFrame object. |
aFrameLayout | A reference to a TFrameLayoutBase object that defines the memory layout of the CImageFrame object. |
Leave Codes | |
---|---|
KErrNotReady | The current state is not EInitialized or the ImageProcessor is busy |
Other | A range of system wide error codes. |
IMPORT_C void | InitializeL | ( | ) |
Initializes the preview.
Leave Codes | |
---|---|
KErrNorReady | if preview is not in state |
A | range of system wide error code. |
Gets the current pan factor of the preview screen.
Leave Codes | |
---|---|
KErrNotReady | The current state is EUninitialized or the ImageProcessor is busy. |
Other | A range of system wide error codes. |
Converts a coordinate from preview screen to current coordinate system.
Parameters | |
---|---|
aPreviewPoint | A TPoint pointer specifying the preview screen from which to convert the coordinate. |
aCurrentPoint | Pointer to a TPoint object with the coordinate to convert. The converted coordinate is stored back into the object. |
Leave Codes | |
---|---|
KErrNotReady | The current state is EUninitialized. |
Other | A range of system wide error codes. |
IMPORT_C void | RenderL | ( | ) |
Starts the rendering. The preview state is set to ERendering
Leave Codes | |
---|---|
KErrNotReady | The current state is not EInitialized or the ImageProcessor is busy or input is not set or output is not set. |
Other | A range of system wide error codes. |
IMPORT_C void | SetOutputL | ( | CFbsBitmap & | aBitmap | ) |
Sets CFbsBitmap as the output bitmap of the preview.
Parameters | |
---|---|
aBitmap | The output bitmap |
Leave Codes | |
---|---|
KErrNotReady | The current state is not EInitialized or the ImageProcessor is busy |
A | range of system wide error codes |
IMPORT_C void | SetOutputL | ( | CImageFrame & | aPixelBuffer | ) |
Sets an image frame as the output bitmap of the preview.
Parameters | |
---|---|
aPixelBuffer | The CImageFrame buffer. |
Leave Codes | |
---|---|
KErrNotReady | The current state is not EInitialized or the ImageProcessor is busy |
Other | A range of system wide error codes. |
Specifies the pan factor for the preview screen. The zoomed screen will be panned to the new coordinate after rendering.
Parameters | |
---|---|
aPanX | The horizontal pan factor for the current preview, -1.0f to 1.0f. |
aPanY | The vertical pan factor for the current preview, -1.0f to 1.0f. |
Leave Codes | |
---|---|
KErrNotReady | The current state is not EInitialized or the ImageProcessor is busy |
KErrArgument | The pan factor is out of range. |
Other | A range of system wide error codes. |
IMPORT_C void | SetPreviewId | ( | TInt | aPreviewId | ) |
Specifies the id of the preview.
Parameters | |
---|---|
aPreviewId | The id of the current preview |
IMPORT_C void | SetZoomL | ( | TReal32 | aZoom | ) |
Specifies the zoom factor for the preview screen. The screen will be zoomed after rendering.
Parameters | |
---|---|
aZoom | The zoom factor for the current preview, 1.0f to infinite. |
Leave Codes | |
---|---|
KErrNotReady | The current state is not EInitialized or the ImageProcessor is busy. |
Other | A range of system wide error codes. |
IMPORT_C TSize | SizeL | ( | ) | const |
Gets the current size of the preview screen.
Leave Codes | |
---|---|
KErrNotReady | The current state is EUninitialized. |
Other | A range of system wide error codes. |
IMPORT_C TPreview::TState | State | ( | ) | const |
Gets the current state of the preview.
Gets the supported output formats for the preview.
IMPORT_C void | SupportedOutputDisplayModesL | ( | RArray< TDisplayMode > & | aDisplayModes | ) | const |
Gets the supported output display modes for the preview.
IMPORT_C void | UninitializeL | ( | ) |
Uninitializes the preview.
Leave Codes | |
---|---|
KErrNotReady | The current state is not EInitialized or the ImageProcessor is busy |
Other | A range of system wide error codes. |
IMPORT_C TReal32 | ZoomL | ( | ) | const |
Gets the current zoom factor of the preview screen.
Leave Codes | |
---|---|
KErrNotReady | The current state is EUninitialized or the ImageProcessor is busy. |
Other | A range of system wide error codes. |