On Wed, Aug 26, 2009 at 4:12 PM, Paweł Hajdan
Jr.<[email protected]> wrote:
> How do I create a SkBitmap of arbitrary size, filled with color of my choice
> (on Linux)?

Without any testing at all, it would look a little like

SkBitmap bitmap;
bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height);
bitmap.allocPixels();
SkCanvas canvas(bitmap);
SkPaint paint;
paint.setARGB(a, r, g, b);
paint.setStyle(SkPaint::kFill_Style);
SkIRect rect;
rect.set(left, top, right, bottom);
canvas.drawIRect(rect, paint);


AGL

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to