Example #1
0
 public static void getImageSize(String assetPath, out Size size)
 {
     int width = 0, height = 0;
     NativeManagement.resetCppError();
     CKLBLuaLibASSET_getImageSize(__MarshallingUtils.NativeUtf8FromString(assetPath), ref width, ref height);
     NativeManagement.resetCppError();
     size.width = width;
     size.height = height;
 }
Example #2
0
 public static void getAssetInfo(String assetPath, out Size imgSize, out FSize boundSize)
 {
     int imgWidth = 0, imgHeight = 0;
     float boundWidth = 0, boundHeight = 0;
     NativeManagement.resetCppError();
     CKLBLuaLibASSET_getAssetInfo(__MarshallingUtils.NativeUtf8FromString(assetPath), ref imgWidth, ref imgHeight, ref boundWidth, ref boundHeight);
     NativeManagement.intercepCppError();
     imgSize.width    = imgWidth;
     imgSize.height   = imgHeight;
     boundSize.width  = boundWidth;
     boundSize.height = boundHeight;
 }
Example #3
0
 public void getSize(out Size size)
 {
     if(CppObject != IntPtr.Zero)
     {
         size.width = CKLBUIWebArea_getWidth(CppObject);
         size.height = CKLBUIWebArea_getHeight(CppObject);
     }
     else
         throw new CKLBExceptionNullCppObject();
 }
Example #4
0
 public void setSize(Size size)
 {
     if(CppObject != IntPtr.Zero)
     {
         CKLBUIWebArea_setWidth(CppObject, size.width);
         CKLBUIWebArea_setHeight(CppObject, size.height);
     }
     else
         throw new CKLBExceptionNullCppObject();
 }
Example #5
0
 public void getSize(out Size size)
 {
     size.width  = CKLBUIScrollBar_getWidth(CppObject);
     size.height = CKLBUIScrollBar_getHeight(CppObject);
 }