Objective-C API Library Reference  4.3.0-42-g45f162a
 All Classes Functions Typedefs Properties Pages
Public Functions | Public Static Functions | Properties | List of all members
PWImageRenderer Class Reference

The PWImageRenderer class is an implementation of PWViewRenderer that loads and renders images in JPEG and PNG formats.

Constructors

(id) - initWithView:
 

Public Functions

(void) - activate
 
(void) - clear
 
(void) - deactivate
 
(CGPoint) - localToNormalized:
 
(CGPoint) - localToSource:
 
(CGPoint) - normalizedToLocal:
 
(PWXmlElement *) - profilerInfo
 
(void) - renderBytes:bytes:encodingParameters:
 
(CGPoint) - sourceToLocal:
 

Public Static Functions

(PWImageRenderer *) + rendererWithView:
 

Properties

PWEventPublisher * activated
 
PWEventPublisher * deactivated
 
PWEventTimerProfilerdecodingTimer
 
PWMatrix * localToNormalizedTransform
 
PWMatrix * localToSourceTransform
 
PWMatrix * normalizedToLocalTransform
 
PWEventTimerProfilerrenderingTimer
 
PWRectangle * sourceSize
 
PWEventPublisher * sourceSizeChanged
 
PWMatrix * sourceToLocalTransform
 
CALayer * target
 
PWEventPublisher * transformsChanged
 
PWRectangle * viewSize
 
PWEventPublisher * viewSizeChanged
 
PWEventPublisher * viewUpdated
 

Methods Descriptions

- (void) activate

Called when a ViewRenderer is being used by a view. The intention is that ViewRenderer implementation will add subComponents to its target for display when activated. It is best to use the ViewRendererEvent.ACTIVATED event in ViewRenderer implementations rather than overriding this method. If you override this method, you MUST call the base method first.

- (void) clear

Clears the view image data. It is HIGHLY recommended that your implementation override this method in order to properly clear the display.

- (void) deactivate

Called when a ViewRenderer will stop being used by the view. The intention is that ViewRenderer implementation will remove subComponents from the target. It is best to use the ViewRendererEvent.DEACTIVATED event in ViewRenderer implementations rather than overring this method. If you override this method, you MUST call the base method last.

- (id) initWithView: (CALayer *)  target

Creates a new ViewRenderer and attaches it to the specified target view.

- (CGPoint) localToNormalized: (CGPoint)  local

Converts a point from local coordinates to normalized coordinates.

- (CGPoint) localToSource: (CGPoint)  local

Converts a point from local coordinates to coordinates of the back buffer image (source coordinates).

- (CGPoint) normalizedToLocal: (CGPoint)  normalized

Converts a point from normalized coordinates to local coordinates.

- (PWXmlElement *) profilerInfo

This profiler information will be attached to the view profiler information when the view is attached.

Reimplemented from <PWProfilerDelegate>.

- (void) renderBytes: (NSString *)  mimeType
bytes: (NSData *)  bytes
encodingParameters: (NSDictionary *)  encodingParameters 

Called when bytes are received and should be renderered. It is HIGHLY recommended to override this method in your implementation to render display data.

Parameters
mimeTypeThe mime type defined when this ViewRenderer was registered.
bytesThe data to be renderered.
encodingParametersA dictionary of parameters set by the service for this encoded data.
+ (PWImageRenderer *) rendererWithView: (CALayer *)  view

Renders the specified view, other than the default view.

- (CGPoint) sourceToLocal: (CGPoint)  source

Converts a point from image (source) coordinates to local coordinates.

Properties Descriptions

- (PWEventPublisher*) activated
readwritenonatomicstronginherited

The event that will get dispatched when this renderer is added to a view.

- (PWEventPublisher*) deactivated
readwritenonatomicstronginherited

The event that will get dispatched when this renderer is removed from a view.

- (PWEventTimerProfiler*) decodingTimer
readwritenonatomicstrong

A profiler that measures how long it takes to decode an image.

- (PWMatrix*) localToNormalizedTransform
readnonatomicstronginherited

The matrix used for localToNormalized transforms. (Useful for render operations.)

- (PWMatrix*) localToSourceTransform
readnonatomicstronginherited

The matrix used for localToSource transforms. (Useful for render operations.)

- (PWMatrix*) normalizedToLocalTransform
readnonatomicstronginherited

The matrix used for normalizedToLocal transforms. (Useful for render operations.)

- (PWEventTimerProfiler*) renderingTimer
readwritenonatomicstrong

A profiler that measures how long it takes to render an image.

- (PWRectangle*) sourceSize
readwritenonatomicstronginherited

The size of the corresponding view on the service. This is related to the ClientSize property on the service view.

- (PWEventPublisher*) sourceSizeChanged
readwritenonatomicstronginherited

The event that will get dispatched when imageSize is set.

- (PWMatrix*) sourceToLocalTransform
readnonatomicstronginherited

The matrix used for sourceToLocal transforms. (Useful for render operations.)

- (CALayer*) target
readnonatomicstronginherited

The PWView that is the target of the rendering.

- (PWEventPublisher*) transformsChanged
readwritenonatomicstronginherited

The event that will get dispatched when viewToSource or viewToNormalized transforms change.

- (PWRectangle*) viewSize
readnonatomicstronginherited

The size of the target area for this view. Your implementation should render to this size.

- (PWEventPublisher*) viewSizeChanged
readwritenonatomicstronginherited

The event that will get dispatched when the target view of this renderer resizes.

- (PWEventPublisher*) viewUpdated
readwritenonatomicstronginherited

The event that will get dispatched when the view display is updated to inform the view.