سؤال

وأنا م الرسم في صورة نقطية مثل ..

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);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top