PXView Class Reference
| Inherits from | UIView |
| Conforms to | NSCoding |
| Declared in | PXView.h PXView.m |
Overview
A UIView subclass that provides a mechanism to create a Pixelwave rendering surface which acts as the root of the entire engine.
Although the view’s render area may be set to any value, it is highly
recommended to set the view’s frame to be the same size as the
screen.
Once instantiated, a PXView starts up all of the engine’s subsytems and initializes the display list, providing a default stage and root display object. To change the application’s root object use the root property.
Only one PXView should exist for the duration of your app.
Tasks
Other Methods
-
rootThe root display object of the Pixelwave engine.
property -
stageThe global stage of the Pixelwave engine.
property -
contentScaleFactorSee iOS API docs for UIView.contentScaleFactor
property -
colorQualityThe color quality the view was created with. This is a read-only property and may only be set at initialization.
property -
– initWithFrame:contentScaleFactor:The size of the newly created view.
-
– initWithFrame:colorQuality:The size of the newly created view.
-
– initWithFrame:contentScaleFactor:colorQuality:The size of the newly created view.
-
– screenshotA screen grab of the current state of the main display list, as a UIImage.
Other Methods
-
– initWithFrame:The size of the newly created view.
Properties
colorQuality
The color quality the view was created with. This is a read-only property and may only be set at initialization.
@property (nonatomic, readonly) PXViewColorQuality colorQualityDeclared In
PXView.hcontentScaleFactor
See iOS API docs for UIView.contentScaleFactor
@property (nonatomic) float contentScaleFactorDeclared In
PXView.hInstance Methods
initWithFrame:
The size of the newly created view.
- (id)initWithFrame:(CGRect)frameParameters
- frame
The size of the newly created view.
Declared In
PXView.minitWithFrame:colorQuality:
The size of the newly created view.
- (id)initWithFrame:(CGRect)frame colorQuality:(PXViewColorQuality)_colorQualityParameters
- frame
The size of the newly created view.
- colorQuality
The quality to use for the underlying OpenGL rendering surface. This value must be one of the possible values defined in PXViewColorQuality. The default value is PXViewColorQuality_Medium.
Declared In
PXView.minitWithFrame:contentScaleFactor:
The size of the newly created view.
- (id)initWithFrame:(CGRect)frame contentScaleFactor:(float)_contentScaleFactorParameters
- frame
The size of the newly created view.
- contentScaleFactor
The multiplier value by which the contents of the view should be scaled. This value usually corresponds to the contentScaleFactor of the device. Pass 0.0 to use the default value.
Declared In
PXView.minitWithFrame:contentScaleFactor:colorQuality:
The size of the newly created view.
- (id)initWithFrame:(CGRect)frame contentScaleFactor:(float)_contentScaleFactor colorQuality:(PXViewColorQuality)_colorQualityParameters
- frame
The size of the newly created view.
- colorQuality
The quality to use for the underlying OpenGL rendering surface. This value must be one of the possible values defined in PXViewColorQuality. The default value is PXViewColorQuality_Medium.
- contentScaleFactor
The multiplier value by which the contents of the view should be scaled. This value usually corresponds to the contentScaleFactor of the device. Pass 0.0 to use the default value.
Declared In
PXView.mscreenshot
A screen grab of the current state of the main display list, as a UIImage.
- (UIImage *)screenshotDiscussion
Please note that this is a fairly expensive method to execute, and shouldn’t be used for real-time effects to avoid a performance hit.
This method is generally intended for debugging purposes, but can be safely used in production.
Declared In
PXView.m