127
128 private static byte[] theTile;
129
130 public synchronized static byte[] getAlphaTile(int len) {
131 byte[] t = theTile;
132 if (t == null || t.length < len) {
133 t = new byte[len];
134 } else {
135 theTile = null;
136 }
137 return t;
138 }
139
140 public synchronized static void dropAlphaTile(byte[] t) {
141 theTile = t;
142 }
143
144 public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) {
145 boolean adjust = (bs != null &&
146 sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
147 boolean thin = (sg.strokeState <= sg.STROKE_THINDASHED);
148
149 Region clip = sg.getCompClip();
150 int abox[] = new int[4];
151 AATileGenerator aatg =
152 renderengine.getAATileGenerator(s, sg.transform, clip,
153 bs, thin, adjust, abox);
154 if (aatg == null) {
155 // Nothing to render
156 return;
157 }
158
159 renderTiles(sg, s, aatg, abox);
160 }
161
162 public void renderTiles(SunGraphics2D sg, Shape s,
163 AATileGenerator aatg, int abox[])
164 {
165 Object context = null;
166 byte alpha[] = null;
167 try {
|
127
128 private static byte[] theTile;
129
130 public synchronized static byte[] getAlphaTile(int len) {
131 byte[] t = theTile;
132 if (t == null || t.length < len) {
133 t = new byte[len];
134 } else {
135 theTile = null;
136 }
137 return t;
138 }
139
140 public synchronized static void dropAlphaTile(byte[] t) {
141 theTile = t;
142 }
143
144 public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) {
145 boolean adjust = (bs != null &&
146 sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
147 boolean thin = (sg.strokeState <= SunGraphics2D.STROKE_THINDASHED);
148
149 Region clip = sg.getCompClip();
150 int abox[] = new int[4];
151 AATileGenerator aatg =
152 renderengine.getAATileGenerator(s, sg.transform, clip,
153 bs, thin, adjust, abox);
154 if (aatg == null) {
155 // Nothing to render
156 return;
157 }
158
159 renderTiles(sg, s, aatg, abox);
160 }
161
162 public void renderTiles(SunGraphics2D sg, Shape s,
163 AATileGenerator aatg, int abox[])
164 {
165 Object context = null;
166 byte alpha[] = null;
167 try {
|