public static CGGradient create(CGColorSpace space, float[] components, float[] locations) { if (space == null) { throw new NullPointerException("space"); } if (components == null) { throw new NullPointerException("components"); } return create( space, VM.getArrayValuesAddress(CoreGraphics.toMachineSizedFloatArray(components)), locations != null ? VM.getArrayValuesAddress(CoreGraphics.toMachineSizedFloatArray(locations)) : 0, locations != null ? locations.length : 0); }
/*</constructors>*/ public NSOutputStream(byte[] bytes) { super((SkipInit) null); if (bytes == null) { throw new NullPointerException("bytes"); } initObject(init(VM.getArrayValuesAddress(bytes), bytes.length)); }
public long write(byte[] bytes, int offset, int length) { NSMutableData.checkOffsetAndCount(bytes.length, offset, length); if (length == 0) { return 0; } return write(VM.getArrayValuesAddress(bytes) + offset, length); }
private static CGGradient create(CGColorSpace space, CGColor[] colors, Object locations) { if (colors == null) { throw new NullPointerException("colors"); } try (CFArray colorsArray = CFArray.create(colors)) { return create( space, colorsArray, locations != null ? VM.getArrayValuesAddress(CoreGraphics.toMachineSizedFloatArray(locations)) : 0); } }