1 /*
2 * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
79 protected TransformHelper(SurfaceType srctype) {
80 super(methodSignature, primTypeID, srctype,
81 CompositeType.SrcNoEa,
82 SurfaceType.IntArgbPre);
83 }
84
85 public TransformHelper(long pNativePrim, SurfaceType srctype,
86 CompositeType comptype,
87 SurfaceType dsttype)
88 {
89 super(pNativePrim, methodSignature, primTypeID,
90 srctype, comptype, dsttype);
91 }
92
93 public native void Transform(MaskBlit output,
94 SurfaceData src, SurfaceData dst,
95 Composite comp, Region clip,
96 AffineTransform itx, int txtype,
97 int sx1, int sy1, int sx2, int sy2,
98 int dx1, int dy1, int dx2, int dy2,
99 int edges[], int dxoff, int dyoff);
100
101 public GraphicsPrimitive makePrimitive(SurfaceType srctype,
102 CompositeType comptype,
103 SurfaceType dsttype)
104 {
105 return null;
106 }
107
108 public GraphicsPrimitive traceWrap() {
109 return new TraceTransformHelper(this);
110 }
111
112 private static class TraceTransformHelper extends TransformHelper {
113 TransformHelper target;
114
115 public TraceTransformHelper(TransformHelper target) {
116 super(target.getSourceType());
117 this.target = target;
118 }
119
120 public GraphicsPrimitive traceWrap() {
121 return this;
122 }
123
124 public void Transform(MaskBlit output,
125 SurfaceData src, SurfaceData dst,
126 Composite comp, Region clip,
127 AffineTransform itx, int txtype,
128 int sx1, int sy1, int sx2, int sy2,
129 int dx1, int dy1, int dx2, int dy2,
130 int edges[], int dxoff, int dyoff)
131 {
132 tracePrimitive(target);
133 target.Transform(output, src, dst, comp, clip, itx, txtype,
134 sx1, sy1, sx2, sy2,
135 dx1, dy1, dx2, dy2,
136 edges, dxoff, dyoff);
137 }
138 }
139 }
|
1 /*
2 * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
79 protected TransformHelper(SurfaceType srctype) {
80 super(methodSignature, primTypeID, srctype,
81 CompositeType.SrcNoEa,
82 SurfaceType.IntArgbPre);
83 }
84
85 public TransformHelper(long pNativePrim, SurfaceType srctype,
86 CompositeType comptype,
87 SurfaceType dsttype)
88 {
89 super(pNativePrim, methodSignature, primTypeID,
90 srctype, comptype, dsttype);
91 }
92
93 public native void Transform(MaskBlit output,
94 SurfaceData src, SurfaceData dst,
95 Composite comp, Region clip,
96 AffineTransform itx, int txtype,
97 int sx1, int sy1, int sx2, int sy2,
98 int dx1, int dy1, int dx2, int dy2,
99 int[] edges, int dxoff, int dyoff);
100
101 public GraphicsPrimitive makePrimitive(SurfaceType srctype,
102 CompositeType comptype,
103 SurfaceType dsttype)
104 {
105 return null;
106 }
107
108 public GraphicsPrimitive traceWrap() {
109 return new TraceTransformHelper(this);
110 }
111
112 private static class TraceTransformHelper extends TransformHelper {
113 TransformHelper target;
114
115 public TraceTransformHelper(TransformHelper target) {
116 super(target.getSourceType());
117 this.target = target;
118 }
119
120 public GraphicsPrimitive traceWrap() {
121 return this;
122 }
123
124 public void Transform(MaskBlit output,
125 SurfaceData src, SurfaceData dst,
126 Composite comp, Region clip,
127 AffineTransform itx, int txtype,
128 int sx1, int sy1, int sx2, int sy2,
129 int dx1, int dy1, int dx2, int dy2,
130 int[] edges, int dxoff, int dyoff)
131 {
132 tracePrimitive(target);
133 target.Transform(output, src, dst, comp, clip, itx, txtype,
134 sx1, sy1, sx2, sy2,
135 dx1, dy1, dx2, dy2,
136 edges, dxoff, dyoff);
137 }
138 }
139 }
|