ECode CDiscretePathEffect::constructor( /* [in] */ Float segmentLength, /* [in] */ Float deviation) { mNativeInstance = NativeCreate( segmentLength, deviation); return NOERROR; }
ECode CComposePathEffect::constructor( /* [in] */ IPathEffect* outerpe, /* [in] */ IPathEffect* innerpe) { mNativeInstance = NativeCreate( ((PathEffect*)outerpe->Probe(EIID_PathEffect))->mNativeInstance, ((PathEffect*)innerpe->Probe(EIID_PathEffect))->mNativeInstance); return NOERROR; }
ECode CBitmapShader::constructor( /* [in] */ IBitmap* bitmap, /* [in] */ ShaderTileMode tileX, /* [in] */ ShaderTileMode tileY) { mBitmap = bitmap; Int32 b = ((CBitmap*)bitmap)->Ni(); mNativeInstance = NativeCreate(b, tileX, tileY); mNativeShader = NativePostCreate(mNativeInstance, b, tileX, tileY); return NOERROR; }
ECode CDashPathEffect::constructor( /* [in] */ const ArrayOf<Float>& intervals, /* [in] */ Float phase) { if (intervals.GetLength() < 2) { // throw new ArrayIndexOutOfBoundsException(); return E_ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION; } mNativeInstance = NativeCreate(intervals, phase); return NOERROR; }
ECode CPathMeasure::constructor( /* [in] */ IPath* path, /* [in] */ Boolean forceClosed) { // The native implementation does not copy the path, prevent it from being GC'd mPath = path; mNativeInstance = NativeCreate( path != NULL ? ((CPath*)path)->Ni() : 0, forceClosed); return NOERROR; }
ECode CAvoidXfermode::constructor( /* [in] */ Int32 opColor, /* [in] */ Int32 tolerance, /* [in] */ Int32 mode) { if (tolerance < 0 || tolerance > 255) { // throw new IllegalArgumentException("tolerance must be 0..255"); return E_ILLEGAL_ARGUMENT_EXCEPTION; } mNativeInstance = NativeCreate(opColor, tolerance, mode); return NOERROR; }
ECode CPathDashPathEffect::constructor( /* [in] */ IPath* shape, /* [in] */ Float advance, /* [in] */ Float phase, /* [in] */ PathDashPathEffectStyle style) { mNativeInstance = NativeCreate( ((CPath*)shape)->mNativePath, advance, phase, style); return NOERROR; }
ECode CPathMeasure::constructor() { mPath = NULL; mNativeInstance = NativeCreate(0, FALSE); return NOERROR; }