Exemplo n.º 1
0
 public CIVector(double[] values) {
   super((SkipInit) null);
   if (values == null) {
     throw new NullPointerException("values");
   }
   MachineSizedFloatPtr p = Struct.allocate(MachineSizedFloatPtr.class, values.length);
   p.set(values);
   initObject(initWithValues$count$(p, values.length));
 }
Exemplo n.º 2
0
 public boolean getWhiteAlpha(double[] whiteAlpha) {
   if (whiteAlpha == null) {
     throw new NullPointerException("whiteAlpha");
   }
   if (whiteAlpha.length != 2) {
     throw new IllegalArgumentException("whiteAlpha.length != 2");
   }
   MachineSizedFloatPtr white = new MachineSizedFloatPtr();
   MachineSizedFloatPtr alpha = new MachineSizedFloatPtr();
   boolean ret = getWhiteAlpha(white, alpha);
   whiteAlpha[0] = white.get();
   whiteAlpha[1] = alpha.get();
   return ret;
 }
Exemplo n.º 3
0
 public boolean getRGBA(double[] rgba) {
   if (rgba == null) {
     throw new NullPointerException("rgba");
   }
   if (rgba.length != 4) {
     throw new IllegalArgumentException("rgba.length != 4");
   }
   MachineSizedFloatPtr red = new MachineSizedFloatPtr();
   MachineSizedFloatPtr green = new MachineSizedFloatPtr();
   MachineSizedFloatPtr blue = new MachineSizedFloatPtr();
   MachineSizedFloatPtr alpha = new MachineSizedFloatPtr();
   boolean ret = getRGBA(red, green, blue, alpha);
   rgba[0] = red.get();
   rgba[1] = green.get();
   rgba[2] = blue.get();
   rgba[3] = alpha.get();
   return ret;
 }
Exemplo n.º 4
0
 public boolean getHSBA(double[] hsba) {
   if (hsba == null) {
     throw new NullPointerException("hsba");
   }
   if (hsba.length != 4) {
     throw new IllegalArgumentException("hsba.length != 4");
   }
   MachineSizedFloatPtr hue = new MachineSizedFloatPtr();
   MachineSizedFloatPtr saturation = new MachineSizedFloatPtr();
   MachineSizedFloatPtr brightness = new MachineSizedFloatPtr();
   MachineSizedFloatPtr alpha = new MachineSizedFloatPtr();
   boolean ret = getHSBA(hue, saturation, brightness, alpha);
   hsba[0] = hue.get();
   hsba[1] = saturation.get();
   hsba[2] = brightness.get();
   hsba[3] = alpha.get();
   return ret;
 }
Exemplo n.º 5
0
 /** @since Available in iOS 3.2 and later. */
 public @MachineSizedFloat double getLeading() {
   MachineSizedFloatPtr ptr = new MachineSizedFloatPtr();
   getTypographicBounds(null, null, ptr);
   return ptr.get();
 }
Exemplo n.º 6
0
 /** @since Available in iOS 3.2 and later. */
 public @MachineSizedFloat double getDescent() {
   MachineSizedFloatPtr ptr = new MachineSizedFloatPtr();
   getTypographicBounds(null, ptr, null);
   return ptr.get();
 }
Exemplo n.º 7
0
 /** @since Available in iOS 3.2 and later. */
 public @MachineSizedFloat double getSecondaryOffset(@MachineSizedSInt long charIndex) {
   MachineSizedFloatPtr ptr = new MachineSizedFloatPtr();
   getOffset(charIndex, ptr);
   return ptr.get();
 }