ImageProcessor::TPreview Class Reference
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.
Constructor & Destructor Documentation
TPreview(Plugin::MPreview &, CImageProcessorImpl &)
Member Functions Documentation
Cancel()
Cancels the preview rendering if the preview state is EInitializing or ERendering, unconditionally aborts the operation.
CanvasAreaL()
IMPORT_C
TRect
|
CanvasAreaL
|
(
|
)
|
const
|
Gets the current canvas as
TRect
in the given screen
-
leave
-
KErrNotReady The current state is EUninitialized.
-
leave
-
Other A range of system wide error codes.
CanvasToCurrentCoordL(const TPoint &, TPoint &)
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.
Parameters
const
TPoint
& aCanvasPoint
|
A TPoint pointer specifying a screen in which the canvas from which to convert the coordinate is located.
|
TPoint
& aCurrentPoint
|
Pointer to a TPoint object with the coordinate to convert. The converted coordinate is stored back into the object.
|
CreateOutputL(const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &)
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.
Parameters
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.
|
GetPanLevelSettings(TReal32 &, TReal32 &)
IMPORT_C void
|
GetPanLevelSettings
|
(
|
TReal32
&
|
aMinimumLevel,
|
|
TReal32
&
|
aMaximumLevel
|
|
)
|
|
Retrieves the pan level range.
Parameters
TReal32
& aMinimumLevel
|
The minimum value of the pan factor.
|
TReal32
& aMaximumLevel
|
The maximum value of the pan factor.
|
GetZoomLevelSettings(TReal32 &, TReal32 &)
IMPORT_C void
|
GetZoomLevelSettings
|
(
|
TReal32
&
|
aMinimumLevel,
|
|
TReal32
&
|
aMaximumLevel
|
|
)
|
|
Retrieves the zoom level range.
Parameters
TReal32
& aMinimumLevel
|
The minimum value of the zoom factor.
|
TReal32
& aMaximumLevel
|
The maximum value of the zoom factor.
|
InitializeL()
IMPORT_C void
|
InitializeL
|
(
|
)
|
|
PanL(TReal32 &, TReal32 &)
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.
PreviewId()
IMPORT_C
TInt
|
PreviewId
|
(
|
)
|
const
|
Gets the id of the preview.
PreviewToCurrentCoordL(const TPoint &, TPoint &)
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.
Parameters
const
TPoint
& aPreviewPoint
|
A TPoint pointer specifying the preview screen from which to convert the coordinate.
|
TPoint
& aCurrentPoint
|
Pointer to a TPoint object with the coordinate to convert. The converted coordinate is stored back into the object.
|
RenderL()
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.
ResetL()
Resets the preview parameters and state.
SetOutputL(CFbsBitmap &)
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
SetOutputL(CImageFrame &)
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.
SetPanL(TReal32, TReal32)
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.
Parameters
TReal32
aPanX
|
The horizontal pan factor for the current preview, -1.0f to 1.0f.
|
TReal32
aPanY
|
The vertical pan factor for the current preview, -1.0f to 1.0f.
|
SetPreviewId(TInt)
IMPORT_C void
|
SetPreviewId
|
(
|
TInt
|
aPreviewId
|
)
|
|
Specifies the id of the preview.
Parameters
TInt
aPreviewId
|
The id of the current preview
|
SetStateL(TPreview::TState)
SetZoomL(TReal32)
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.
Parameters
TReal32
aZoom
|
The zoom factor for the current preview, 1.0f to infinite.
|
SizeL()
IMPORT_C
TSize
|
SizeL
|
(
|
)
|
const
|
Gets the current size of the preview screen.
-
leave
-
KErrNotReady The current state is EUninitialized.
-
leave
-
Other A range of system wide error codes.
State()
Gets the current state of the preview.
SupportedImageFrameFormatsL(RArray< TUid > &)
IMPORT_C void
|
SupportedImageFrameFormatsL
|
(
|
RArray
<
TUid
> &
|
aFormats
|
)
|
const
|
Gets the supported output formats for the preview.
SupportedOutputDisplayModesL(RArray< TDisplayMode > &)
IMPORT_C void
|
SupportedOutputDisplayModesL
|
(
|
RArray
<
TDisplayMode
> &
|
aDisplayModes
|
)
|
const
|
Gets the supported output display modes for the preview.
Parameters
RArray
<
TDisplayMode
> & aDisplayModes
|
|
UninitializeL()
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.
ZoomL()
Gets 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.
Member Enumerations Documentation
Enum TState
The state of the preview screen
Enumerators
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).
|
Member Data Documentation
CImageProcessorImpl & iImageProcessorImpl
TBool
iIsOutputSet
TBool
|
iIsOutputSet
|
[private]
|
Plugin::MPreview & iPreviewImpl
const TBool iValidStates
const
TBool
|
iValidStates
|
[private, static]
|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.