예제 #1
0
 public void png_set_oFFs(int offset_x, int offset_y, PNG_OFFSET unit_type)
 {
     info_ptr_x_offset         = offset_x;
     info_ptr_y_offset         = offset_y;
     info_ptr_offset_unit_type = unit_type;
     info_ptr_valid           |= PNG_INFO.oFFs;
 }
예제 #2
0
 public PNG_INFO png_get_oFFs(ref int offset_x, ref int offset_y, ref PNG_OFFSET unit_type)
 {
     if ((info_ptr_valid & PNG_INFO.oFFs) != PNG_INFO.oFFs)
     {
         return(PNG_INFO.None);
     }
     offset_x  = info_ptr_x_offset;
     offset_y  = info_ptr_y_offset;
     unit_type = info_ptr_offset_unit_type;
     return(PNG_INFO.oFFs);
 }
예제 #3
0
		public PNG_INFO png_get_oFFs(ref int offset_x, ref int offset_y, ref PNG_OFFSET unit_type)
		{
			if((info_ptr_valid&PNG_INFO.oFFs)!=PNG_INFO.oFFs) return PNG_INFO.None;
			offset_x=info_ptr_x_offset;
			offset_y=info_ptr_y_offset;
			unit_type=info_ptr_offset_unit_type;
			return PNG_INFO.oFFs;
		}
예제 #4
0
		public void png_set_oFFs(int offset_x, int offset_y, PNG_OFFSET unit_type)
		{
			info_ptr_x_offset=offset_x;
			info_ptr_y_offset=offset_y;
			info_ptr_offset_unit_type=unit_type;
			info_ptr_valid|=PNG_INFO.oFFs;
		}
예제 #5
0
		// write the oFFs chunk
		void png_write_oFFs(int x_offset, int y_offset, PNG_OFFSET unit_type)
		{
			byte[] buf=new byte[9];

			if(unit_type>=PNG_OFFSET.LAST) Debug.WriteLine("Unrecognized unit type for oFFs chunk");

			png_save_int_32(buf, x_offset);
			png_save_int_32(buf, 4, y_offset);
			buf[8]=(byte)unit_type;

			png_write_chunk(PNG.oFFs, buf, 9);
		}