كيفية تعيين مكافحة التعرج في بلاك بيري العاصفة؟
-
20-09-2019 - |
سؤال
وأنا م الرسم في صورة نقطية مثل ..
bitmap[i] = new Bitmap(60, 60);
Graphics g = new Graphics(bitmap[i]);
g.setColor(Color.BLACK);
g.drawLine(....);
والآن كيفية تعيين مكافحة التعرج على قبل g.drawLine ()؟
المحلول
لالحواف استخدام وضع <لأ href = "http://www.blackberry.com/developers/docs/4.5.0api/net/rim/device/api/ui/Graphics.html#setDrawingStyle(int،٪20boolean ) "يختلط =" noreferrer نوفولو "> setDrawingStyle الفراغ الجمهور (الباحث drawStyle، منطقية على)
لخطوط تستخدم
graphics.setDrawingStyle(Graphics.DRAWSTYLE_AALINES, true);
graphics.drawLine(x1, y1, x2, y2);
graphics.setDrawingStyle(Graphics.DRAWSTYLE_AALINES, false);
لاستخدام poligons
graphics.setDrawingStyle(Graphics.DRAWSTYLE_AAPOLYGONS, true);
graphics.drawRect(x, y, width, height);
graphics.setDrawingStyle(Graphics.DRAWSTYLE_AAPOLYGONS, false);
لا تنتمي إلى StackOverflow