#include <imageprocessor/imageprocessorpreview.h>
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.
Parameter | Description |
---|---|
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. |
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).
Parameter | Description |
---|---|
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. |
Returns: 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.
IMPORT_C void | InitializeL | ( | ) |
Initializes the preview.
Converts a coordinate from preview screen to current coordinate system.
Parameter | Description |
---|---|
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. |
IMPORT_C void | RenderL | ( | ) |
Starts the rendering. The preview state is set to ERendering
IMPORT_C void | SetOutputL | ( | CFbsBitmap & | aBitmap | ) |
Sets CFbsBitmap as the output bitmap of the preview.
Parameter | Description |
---|---|
aBitmap | The output bitmap |
IMPORT_C void | SetOutputL | ( | CImageFrame & | aPixelBuffer | ) |
Sets an image frame as the output bitmap of the preview.
Parameter | Description |
---|---|
aPixelBuffer | The CImageFrame buffer. |
Specifies the pan factor for the preview screen. The zoomed screen will be panned to the new coordinate after rendering.
Parameter | Description |
---|---|
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. |
IMPORT_C void | SetPreviewId | ( | TInt | aPreviewId | ) |
Specifies the id of the preview.
Parameter | Description |
---|---|
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.
Parameter | Description |
---|---|
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.
Returns: The current size of the preview screen.
IMPORT_C TPreview::TState | State | ( | ) | const |
Gets the current state of the preview.
Returns: The current state of the preview.
IMPORT_C void | SupportedOutputDisplayModesL | ( | RArray< TDisplayMode > & | aDisplayModes | ) | const |
Gets the supported output display modes for the preview.
Returns: The supported output display modes.
IMPORT_C void | UninitializeL | ( | ) |
Uninitializes the preview.
IMPORT_C TReal32 | ZoomL | ( | ) | const |
Gets the current zoom factor of the preview screen.
Returns: The current zoom factor of the preview screen.