… | |
… | |
37 | int gc_box_small_width = 8;
|
37 | int gc_box_small_width = 8;
|
38 | int gc_box_small_height = 8;
|
38 | int gc_box_small_height = 8;
|
39 | int gc_box_big_width = 15;
|
39 | int gc_box_big_width = 15;
|
40 | int gc_box_big_height = 15;
|
40 | int gc_box_big_height = 15;
|
41 |
|
41 |
|
|
|
42 | int gc_box_swidth = 4;
|
|
|
43 | int gc_box_swidth_small = 3;
|
|
|
44 |
|
42 | int TOO_MUCH_POINTS = 30;
|
45 | int TOO_MUCH_POINTS = 30;
|
43 | int MAX_DRAW_POINTS = 250;
|
46 | int MAX_DRAW_POINTS = 250;
|
44 |
|
47 |
|
45 | aagtl main_aagtl;
|
48 | aagtl main_aagtl;
|
46 |
|
49 |
|
… | |
… | |
205 | }
|
208 | }
|
206 | }
|
209 | }
|
207 |
|
210 |
|
208 | //
|
211 | //
|
209 | //
|
212 | //
|
210 | box_paint.setStrokeWidth(4);
|
213 | box_paint.setStrokeWidth(gc_box_swidth);
|
211 | if (this.caches_loaded.size() > this.TOO_MUCH_POINTS)
|
214 | if (this.caches_loaded.size() > this.TOO_MUCH_POINTS)
|
212 | {
|
215 | {
|
213 | box_paint.setStrokeWidth(3);
|
216 | box_paint.setStrokeWidth(gc_box_swidth_small);
|
214 | }
|
217 | }
|
|
|
218 |
|
215 | box_paint.setStyle(Paint.Style.STROKE);
|
219 | box_paint.setStyle(Paint.Style.STROKE);
|
216 | RectF gc_box = new RectF(p[0] - box_width, p[1] - box_height, p[0] + box_width, p[1] + box_height);
|
220 | RectF gc_box = new RectF(p[0] - box_width, p[1] - box_height, p[0] + box_width, p[1] + box_height);
|
217 |
|
221 |
|
218 | draw_on_me.drawRect(gc_box, box_paint);
|
222 | draw_on_me.drawRect(gc_box, box_paint);
|
219 | // gc_box = new RectF(p[0] - box_width + 1, p[1] - box_height + 1, p[0] + box_width - 1, p[1]
|
223 | // gc_box = new RectF(p[0] - box_width + 1, p[1] - box_height + 1, p[0] + box_width - 1, p[1]
|
… | |
… | |
221 | // draw_on_me.drawRect(gc_box, box_paint);
|
225 | // draw_on_me.drawRect(gc_box, box_paint);
|
222 |
|
226 |
|
223 | //
|
227 | //
|
224 | //
|
228 | //
|
225 | box_paint.setStrokeWidth(2);
|
229 | box_paint.setStrokeWidth(2);
|
226 | int inside = 3;
|
230 | int inside = (int) (3f * aagtl.Global_dpi_factor);
|
227 | int outside = 2;
|
231 | int outside = (int) (2f * aagtl.Global_dpi_factor);
|
228 | if (this.caches_loaded.size() > this.TOO_MUCH_POINTS)
|
232 | if (this.caches_loaded.size() > this.TOO_MUCH_POINTS)
|
229 | {
|
233 | {
|
230 | box_paint.setStrokeWidth(1);
|
234 | box_paint.setStrokeWidth(1);
|
231 | inside = 1;
|
235 | inside = (int) (1f * aagtl.Global_dpi_factor);
|
232 | outside = 2;
|
236 | outside = (int) (2f * aagtl.Global_dpi_factor);
|
233 | }
|
237 | }
|
234 |
|
238 |
|
235 | box_paint.setColor(Color.BLACK);
|
239 | box_paint.setColor(Color.BLACK);
|
236 | gc_box = new RectF(p[0] - box_width - outside, p[1] - box_height - outside, p[0] + box_width + outside, p[1] + box_height + outside);
|
240 | gc_box = new RectF(p[0] - box_width - outside, p[1] - box_height - outside, p[0] + box_width + outside, p[1] + box_height + outside);
|
237 | draw_on_me.drawRect(gc_box, box_paint);
|
241 | draw_on_me.drawRect(gc_box, box_paint);
|
… | |
… | |
252 | //
|
256 | //
|
253 | // draw GC-code
|
257 | // draw GC-code
|
254 | if (this.main_aagtl.rose.zoom > 15)
|
258 | if (this.main_aagtl.rose.zoom > 15)
|
255 | {
|
259 | {
|
256 | text_paint.setTextScaleX(1.0f);
|
260 | text_paint.setTextScaleX(1.0f);
|
257 | text_paint.setTextSize(25);
|
261 | text_paint.setTextSize(25 * aagtl.Global_dpi_factor);
|
258 | if (this.caches_loaded.size() > this.TOO_MUCH_POINTS)
|
262 | if (this.caches_loaded.size() > this.TOO_MUCH_POINTS)
|
259 | {
|
263 | {
|
260 | text_paint.setTextSize(17);
|
264 | text_paint.setTextSize(17 * aagtl.Global_dpi_factor);
|
261 | }
|
265 | }
|
262 | draw_on_me.drawText(this_gc.name, p[0] - box_width, p[1] - box_height - 6, text_paint);
|
266 | draw_on_me.drawText(this_gc.name, p[0] - box_width, p[1] - box_height - 6, text_paint);
|
263 | }
|
267 | }
|
264 | //
|
268 | //
|
265 | // draw fullname (only first 20 letters!!)
|
269 | // draw fullname (only first 20 letters!!)
|
266 | if (this.main_aagtl.rose.zoom > 17)
|
270 | if (this.main_aagtl.rose.zoom > 17)
|
267 | {
|
271 | {
|
268 | text_paint.setTextScaleX(0.9f);
|
272 | text_paint.setTextScaleX(0.9f);
|
269 | text_paint.setTextSize(19);
|
273 | text_paint.setTextSize(19* aagtl.Global_dpi_factor);
|
270 | if (this.caches_loaded.size() > this.TOO_MUCH_POINTS)
|
274 | if (this.caches_loaded.size() > this.TOO_MUCH_POINTS)
|
271 | {
|
275 | {
|
272 | text_paint.setTextSize(15);
|
276 | text_paint.setTextSize(15* aagtl.Global_dpi_factor);
|
273 | }
|
277 | }
|
274 | draw_on_me.drawText(this_gc.title.substring(0, Math.min(20, this_gc.title.length())), p[0] - box_width, p[1] + box_height + 19, text_paint);
|
278 | draw_on_me.drawText(this_gc.title.substring(0, Math.min(20, this_gc.title.length())), p[0] - box_width, p[1] + box_height + 19, text_paint);
|
275 | }
|
279 | }
|
276 |
|
280 |
|
277 | if (this.main_aagtl.rose.current_target != null)
|
281 | if (this.main_aagtl.rose.current_target != null)
|
… | |
… | |
349 | {
|
353 | {
|
350 | bitmap_main.recycle();
|
354 | bitmap_main.recycle();
|
351 | }
|
355 | }
|
352 | bitmap_main = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
|
356 | bitmap_main = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
|
353 | image_main = new Canvas(bitmap_main);
|
357 | image_main = new Canvas(bitmap_main);
|
|
|
358 |
|
|
|
359 | // DPI
|
|
|
360 | gc_box_small_width = (int) ((float) 8 * ((float) aagtl.Global_real_dpi / (float) aagtl.Global_want_dpi));
|
|
|
361 | gc_box_small_height = (int) ((float) 8 * ((float) aagtl.Global_real_dpi / (float) aagtl.Global_want_dpi));
|
|
|
362 | gc_box_big_width = (int) ((float) 15 * ((float) aagtl.Global_real_dpi / (float) aagtl.Global_want_dpi));
|
|
|
363 | gc_box_big_height = (int) ((float) 15 * ((float) aagtl.Global_real_dpi / (float) aagtl.Global_want_dpi));
|
|
|
364 |
|
|
|
365 | gc_box_swidth = (int) ((float) 4 * ((float) aagtl.Global_real_dpi / (float) aagtl.Global_want_dpi));
|
|
|
366 | gc_box_swidth_small = (int) ((float) 3 * ((float) aagtl.Global_real_dpi / (float) aagtl.Global_want_dpi));
|
|
|
367 |
|
354 | }
|
368 | }
|
355 |
|
369 |
|
356 | }
|
370 | }
|