ZFFramework
 
Loading...
Searching...
No Matches
ZFUIImageIO.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFUIImageIO_h_
7#define _ZFI_ZFUIImageIO_h_
8
9#include "ZFUIImage.h"
11
12// ============================================================
13// raw image io
19 , ZFMP_IN(const ZFInput &, inputCallback)
20 )
25 , ZFMP_OUT(const ZFOutput &, outputCallback)
26 , ZFMP_IN(ZFUIImage *, image)
27 )
32 , ZFMP_IN(const ZFInput &, inputCallback)
33 )
36 , ZFMP_IN_OUT(ZFUIImage *, ret)
37 , ZFMP_IN(const ZFInput &, inputCallback)
38 )
47 , ZFMP_OUT(const ZFOutput &, outputCallback)
48 , ZFMP_IN(ZFUIImage *, image)
49 )
50
61#define ZFUIImageSerializeType_ZFUIImageFromInput "ZFUIImageFromInput"
62
64#define ZFSerializableKeyword_ZFUIImageFromInput_imageData "imageData"
65
66// ============================================================
67// ZFUIImageScale
77 , ZFMP_IN(ZFUIImage *, image)
78 , ZFMP_IN(const ZFUISize &, newSize)
79 )
80
81// ============================================================
82// ZFUIImageInFrame
96#define ZFUIImageSerializeType_ZFUIImageInFrame "ZFUIImageInFrame"
97
99#define ZFSerializableKeyword_ZFUIImageInFrame_ref "ref"
101#define ZFSerializableKeyword_ZFUIImageInFrame_refFrame "refFrame"
102
109 , ZFMP_IN(ZFUIImage *, image)
110 , ZFMP_IN(const ZFUIRect &, frame)
114 , ZFMP_IN_OUT(ZFUIImage *, ret)
115 , ZFMP_IN(ZFUIImage *, image)
116 , ZFMP_IN(const ZFUIRect &, frame)
118
119// ============================================================
120// ZFUIImageFromNativeImage
125 , ZFMP_IN(void *, nativeImage)
126 , ZFMP_IN_OPT(zfbool, retainNativeImage, zftrue)
128
129// ============================================================
130// color
144#define ZFUIImageSerializeType_ZFUIImageFromColor "ZFUIImageFromColor"
145
147#define ZFSerializableKeyword_ZFUIImageFromColor_color "color"
149#define ZFSerializableKeyword_ZFUIImageFromColor_size "size"
150
158 , ZFMP_IN(const ZFUIColor &, color)
159 , ZFMP_IN_OPT(const ZFUISize &, size, ZFUISizeZero())
163 , ZFMP_IN_OUT(ZFUIImage *, ret)
164 , ZFMP_IN(const ZFUIColor &, color)
165 , ZFMP_IN_OPT(const ZFUISize &, size, ZFUISizeZero())
167
169#endif // #ifndef _ZFI_ZFUIImageIO_h_
170
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
#define zftrue
bool true type
Definition ZFCoreTypeDef_CoreType.h:107
#define ZFMP_IN_OUT(ParamType, paramName)
see ZFMP_IN
Definition ZFMethod.h:117
#define ZFMP_OUT(ParamType, paramName)
see ZFMP_IN
Definition ZFMethod.h:111
#define ZFMP_IN_OPT(ParamType, paramName, DefaultValue)
see ZFMP_IN
Definition ZFMethod.h:108
#define ZFMP_IN(ParamType, paramName)
macro to wrap param types for ZFMETHOD_INLINE_0 series
Definition ZFMethod.h:105
#define ZFMETHOD_FUNC_DECLARE_2(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:763
#define ZFMETHOD_FUNC_DECLARE_3(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1, ZFMP_2)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:910
#define ZFMETHOD_FUNC_DECLARE_1(ZFLIB_, ReturnType, MethodName, ZFMP_0)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:624
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
zfbool ZFUIImageToOutput(const ZFOutput &outputCallback, ZFUIImage *image)
save image to file
zfautoT< ZFUIImage > ZFUIImageInFrame(ZFUIImage *image, const ZFUIRect &frame)
clip an exist image and sharing low level data if possible
zfautoT< ZFUIImage > ZFUIImageFromNativeImage(void *nativeImage, zfbool retainNativeImage=(_ZFT_t_zftrue))
create image from native image
zfautoT< ZFUIImage > ZFUIImageFromInput(const ZFInput &inputCallback)
load image from file
zfbool ZFUIImageFromColorT(ZFUIImage *ret, const ZFUIColor &color, const ZFUISize &size=(ZFUISizeZero()))
see ZFUIImageFromColor
zfbool ZFUIImageInFrameT(ZFUIImage *ret, ZFUIImage *image, const ZFUIRect &frame)
see ZFUIImageInFrame
zfbool ZFUIImageToBase64(const ZFOutput &outputCallback, ZFUIImage *image)
save image to base64 data
zfbool ZFUIImageFromInputT(ZFUIImage *ret, const ZFInput &inputCallback)
see ZFUIImageFromInput
zfautoT< ZFUIImage > ZFUIImageScale(ZFUIImage *image, const ZFUISize &newSize)
scale and return the newly created scaled image
zfautoT< ZFUIImage > ZFUIImageFromColor(const ZFUIColor &color, const ZFUISize &size=(ZFUISizeZero()))
load image from color
zfautoT< ZFUIImage > ZFUIImageFromBase64(const ZFInput &inputCallback)
load image from base64 data
#define ZFLIB_ZFUIKit
used to export symbols
Definition ZFUIKitDef.h:16
_zft_ZFUIColor ZFUIColor
color with AARRGGBB format
Definition ZFUITypeDef.h:1184
ZFUISize const & ZFUISizeZero(void)
(0, 0)
Definition ZFUITypeDef.h:421
general input callback
Definition ZFIOCallback_input.h:37
general output callback
Definition ZFIOCallback_output.h:37
image storage
Definition ZFUIImage.h:30
2D rectangle
Definition ZFUITypeDef.h:636
2D size
Definition ZFUITypeDef.h:397
type restrict version of zfauto
Definition zfautoFwd.h:110