-
Notifications
You must be signed in to change notification settings - Fork 421
CAImageView
Image control that display image on screen.
CAView
Access modifier |
Attribute name |
Description |
public |
Image |
image that imageView displays |
public |
ImageViewScaleType |
imageView’s scale mode |
Access modifier |
Method name |
Description |
public |
createWithImage |
create imageView by using CAImage to load texture |
public |
setImageAsyncWithFile |
load texture by adopting asynchronous mode
|
Image
Type: CAImage*
Description: imageView’s image attribute, namely the displayed content, public get/set{}.
ImageViewScaleType
Type: CAImageViewScaleType
Description: set imageView’s scale mode, including five types: fitImageXY by default, fully populated; fitImageCrop, fully populated in no-distortion condition and auto-cut excess part; fitImageInside, fully populated, no distortion; fitViewByHorizontal, fully displayed and horizontal adaptive in no-distortion condition; fitViewByVertical, fully displayed and vertical adaptive in no-distortion condition. public get/set{}.
1 2 3 4 5 6 7 8 |
typedef enum { CAImageViewScaleTypeFitImageXY=0, CAImageViewScaleTypeFitImageCrop, CAImageViewScaleTypeFitImageInside, CAImageViewScaleTypeFitViewByHorizontal, CAImageViewScaleTypeFitViewByVertical, }CAImageViewScaleType; |
static CAImageView createWithImage(CAImage image)**
Return value: static CAImageView*
Parameter name
Type |
Parameter name |
Description |
CAImage* |
image |
texture object that we use |
virtual void setImageAsyncWithFile(const char fileName)*
Return value: void
Parameter:
Type |
Parameter name |
Description |
const char* |
fileName |
image name |