|
Urbi SDK Remote for Java
2.7.5
|
00001 /* ---------------------------------------------------------------------------- 00002 * This file was automatically generated by SWIG (http://www.swig.org). 00003 * Version 2.0.4 00004 * 00005 * Do not make changes to this file unless you know what you are doing--modify 00006 * the SWIG interface file instead. 00007 * ----------------------------------------------------------------------------- */ 00008 00009 package urbi; 00010 /*---------. 00011 | UImage. | 00012 `---------*/ 00013 /** Class encapsulating an image. 00014 00015 This class does not handle its memory: the data field msut be 00016 freed manualy. */ 00017 00018 public class UImage { 00019 private long swigCPtr; 00020 protected boolean swigCMemOwn; 00021 00022 public UImage(long cPtr, boolean cMemoryOwn) { 00023 swigCMemOwn = cMemoryOwn; 00024 swigCPtr = cPtr; 00025 } 00026 00027 public static long getCPtr(UImage obj) { 00028 return (obj == null) ? 0 : obj.swigCPtr; 00029 } 00030 00031 protected void finalize() { 00032 delete(); 00033 } 00034 00035 public synchronized void delete() { 00036 if (swigCPtr != 0) { 00037 if (swigCMemOwn) { 00038 swigCMemOwn = false; 00039 urbiJNI.delete_UImage(swigCPtr); 00040 } 00041 swigCPtr = 0; 00042 } 00043 } 00044 00045 /// Return an empty UImage. 00046 /// Not a constructor so that we can still put it in a union. 00047 public static UImage make() { 00048 return new UImage(urbiJNI.UImage_make(), true); 00049 } 00050 00051 public void init() { 00052 urbiJNI.UImage_init(swigCPtr, this); 00053 } 00054 00055 /// Return a legible definition of imageFormat. 00056 public String format_string() { 00057 return urbiJNI.UImage_format_string(swigCPtr, this); 00058 } 00059 00060 public void setData(byte[] value) { 00061 urbiJNI.UImage_data_set(swigCPtr, this, value); 00062 } 00063 00064 public byte[] getData() { 00065 return urbiJNI.UImage_data_get(swigCPtr, this); 00066 } 00067 00068 public void setSize(long value) { 00069 urbiJNI.UImage_size_set(swigCPtr, this, value); 00070 } 00071 00072 public long getSize() { 00073 return urbiJNI.UImage_size_get(swigCPtr, this); 00074 } 00075 00076 public void setWidth(long value) { 00077 urbiJNI.UImage_width_set(swigCPtr, this, value); 00078 } 00079 00080 public long getWidth() { 00081 return urbiJNI.UImage_width_get(swigCPtr, this); 00082 } 00083 00084 public void setHeight(long value) { 00085 urbiJNI.UImage_height_set(swigCPtr, this, value); 00086 } 00087 00088 public long getHeight() { 00089 return urbiJNI.UImage_height_get(swigCPtr, this); 00090 } 00091 00092 public void setImageFormat(UImageFormat value) { 00093 urbiJNI.UImage_imageFormat_set(swigCPtr, this, value.swigValue()); 00094 } 00095 00096 public UImageFormat getImageFormat() { 00097 return UImageFormat.swigToEnum(urbiJNI.UImage_imageFormat_get(swigCPtr, this)); 00098 } 00099 00100 public void deleteData() { 00101 urbiJNI.UImage_deleteData(swigCPtr, this); 00102 } 00103 00104 public UImage() { 00105 this(urbiJNI.new_UImage(), true); 00106 } 00107 00108 }