ZFFramework
 
Loading...
Searching...
No Matches
ZFProtocolZFUIImage.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFProtocolZFUIImage_h_
7#define _ZFI_ZFProtocolZFUIImage_h_
8
9#include "ZFCore/ZFProtocol.h"
10#include "ZFUIKit/ZFUIImage.h"
12
17public:
22 virtual void *nativeImageFromInput(ZF_IN const ZFInput &inputCallback) zfpurevirtual;
27 ZF_IN void *nativeImage
28 , ZF_OUT const ZFOutput &outputCallback
30
35 virtual void *nativeImageCopy(ZF_IN void *nativeImage) zfpurevirtual;
36
41 virtual void *nativeImageRetain(ZF_IN void *nativeImage) zfpurevirtual;
47 virtual void nativeImageRelease(ZF_IN void *nativeImage) zfpurevirtual;
48
52 virtual ZFUISize nativeImageSize(ZF_IN void *nativeImage) zfpurevirtual;
54
55
59 ZFENUM_VALUE(TopLeft)
60 ZFENUM_VALUE(TopCenter)
61 ZFENUM_VALUE(TopRight)
62 ZFENUM_VALUE(CenterLeft)
63 ZFENUM_VALUE(CenterCenter)
64 ZFENUM_VALUE(CenterRight)
65 ZFENUM_VALUE(BottomLeft)
66 ZFENUM_VALUE(BottomCenter)
67 ZFENUM_VALUE(BottomRight)
70 ZFENUM_VALUE_REGISTER(TopCenter)
71 ZFENUM_VALUE_REGISTER(TopRight)
72 ZFENUM_VALUE_REGISTER(CenterLeft)
73 ZFENUM_VALUE_REGISTER(CenterCenter)
74 ZFENUM_VALUE_REGISTER(CenterRight)
75 ZFENUM_VALUE_REGISTER(BottomLeft)
76 ZFENUM_VALUE_REGISTER(BottomCenter)
77 ZFENUM_VALUE_REGISTER(BottomRight)
80
92
93
105 , ZF_IN const ZFUISize &srcSize
106 , ZF_IN const ZFUIMargin &srcNinePatch
107 , ZF_IN const ZFUISize &dstSize
108 );
109
111#endif // #ifndef _ZFI_ZFProtocolZFUIImage_h_
112
#define zfpurevirtual
dummy macro shows that a method is pure virtual method
Definition ZFCoreTypeDef_ClassType.h:68
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
#define zfclassPOD
shows the class is a POD type
Definition ZFCoreTypeDef_ClassType.h:35
#define ZF_OUT
dummy macro that shows the param used as required output
Definition ZFCoreTypeDef_ClassType.h:188
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
_ZFT_t_zfindex zfindex
similar to size_t, used for index and size only
Definition ZFCoreTypeDef_CoreType.h:154
#define ZFOUTPUT_TYPE_DECLARE(ZFLIB_, T_Type)
see ZFOUTPUT_TYPE
Definition ZFCoreTypeDef_OtherType.h:244
#define ZFCORE_POD_DECLARE(Type)
explicitly declare as POD
Definition ZFCoreUtilTemplate.h:554
#define ZFENUM_SEPARATOR()
see ZFENUM_BEGIN
Definition ZFEnumDeclare.h:158
#define ZFENUM_VALUE_REGISTER(Value)
see ZFENUM_BEGIN
Definition ZFEnumDeclare.h:168
#define ZFENUM_REG(ZFLIB_, EnumName,...)
see ZFENUM_BEGIN
Definition ZFEnumDeclare.h:186
#define ZFENUM_VALUE(Value)
see ZFENUM_BEGIN
Definition ZFEnumDeclare.h:151
#define ZFENUM_BEGIN(ZFLIB_, EnumName)
macros to define reflectable enum type
Definition ZFEnumDeclare.h:147
#define ZFENUM_END(ZFLIB_, EnumName)
see ZFENUM_BEGIN
Definition ZFEnumDeclare.h:172
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
protocol definitions for ZFFramework
#define ZFPROTOCOL_INTERFACE_END(ModuleName)
for more information, please refer to ZFPROTOCOL_INTERFACE_BEGIN
Definition ZFProtocol.h:414
#define ZFPROTOCOL_INTERFACE_BEGIN(ZFLIB_, ModuleName)
declare a protocol interface for ZFFramework
Definition ZFProtocol.h:408
zfindex ZFUIImageImplNinePatchCalc(ZFUIImageImplNinePatchDrawData *outBuf, const ZFUISize &srcSize, const ZFUIMargin &srcNinePatch, const ZFUISize &dstSize)
util method for implementation to calculate nine patch areas
v_ZFUIImageImplNinePatchPos::ZFEnumType ZFUIImageImplNinePatchPos
see v_ZFUIImageImplNinePatchPos
Definition ZFProtocolZFUIImage.h:78
#define ZFLIB_ZFUIKit
used to export symbols
Definition ZFUIKitDef.h:16
general input callback
Definition ZFIOCallback_input.h:37
general output callback
Definition ZFIOCallback_output.h:37
virtual void nativeImageRelease(void *nativeImage)=0
release the image
virtual void * nativeImageCopy(void *nativeImage)=0
copy the nativeImage and return the copied one, copied image would be released by nativeImageRelease
virtual void * nativeImageFromInput(const ZFInput &inputCallback)=0
load image from input as binary data, created image would be released by nativeImageRelease
virtual ZFUISize nativeImageSize(void *nativeImage)=0
get size of the image (in pixel)
virtual void * nativeImageRetain(void *nativeImage)=0
retain the image, you may return a different one
virtual zfbool nativeImageToOutput(void *nativeImage, const ZFOutput &outputCallback)=0
save image to output as binary data
image storage
Definition ZFUIImage.h:30
see ZFUIImageImplNinePatchCalc
Definition ZFProtocolZFUIImage.h:84
ZFUIRect src
src rect to draw bitmap from, ensured valid
Definition ZFProtocolZFUIImage.h:87
ZFUIRect dst
dst rect to draw bitmapt to, ensured valid
Definition ZFProtocolZFUIImage.h:88
ZFUIImageImplNinePatchPos position
position of the nine patch piece
Definition ZFProtocolZFUIImage.h:86
margin
Definition ZFUITypeDef.h:147
2D rectangle
Definition ZFUITypeDef.h:636
2D size
Definition ZFUITypeDef.h:397