Lines Matching refs:BITMAP
49 class Bitmap {
51 Bitmap(const Context& context, int x, int y) {
55 hdr.biHeight = -y; // Minus means top-down bitmap.
70 ~Bitmap() {
79 DISALLOW_COPY_AND_ASSIGN(Bitmap);
82 // Lightweight raw-bitmap management. The image, once initialized, is immuable.
92 SkBitmap bitmap;
95 compressed.size(), &bitmap));
96 SetSkBitmap(bitmap);
101 // Use a different way to access the bitmap. The normal way would be to
105 HGDIOBJ bitmap = GetCurrentObject(context, OBJ_BITMAP);
106 EXPECT_TRUE(bitmap != NULL);
107 // Initialize the clip region to the entire bitmap.
108 BITMAP bitmap_data;
109 EXPECT_EQ(GetObject(bitmap, sizeof(BITMAP), &bitmap_data), sizeof(BITMAP));
119 Image(const SkBitmap& bitmap) : ignore_alpha_(true) {
120 SetSkBitmap(bitmap);
167 // of the size of the 'actual' bitmap.
187 void SetSkBitmap(const SkBitmap& bitmap) {
188 SkAutoLockPixels lock(bitmap);
189 width_ = bitmap.width();
190 height_ = bitmap.height();
191 row_length_ = static_cast<int>(bitmap.rowBytes());
194 memcpy(&*data_.begin(), bitmap.getAddr(0, 0), size);
205 // Actual bitmap data in arrays of RGBAs (so when loaded as uint32, it's
267 // Compares or saves the bitmap currently loaded in the context, depending on
288 // Compares the bitmap currently loaded in the context with the file. Returns
298 // Saves the bitmap currently loaded in the context into the file.
313 void Premultiply(SkBitmap bitmap) {
314 SkAutoLockPixels lock(bitmap);
315 for (int x = 0; x < bitmap.width(); ++x) {
316 for (int y = 0; y < bitmap.height(); ++y) {
317 uint32_t* pixel_addr = bitmap.getAddr32(x, y);
335 SkBitmap* bitmap,
343 compressed.size(), bitmap));
345 EXPECT_EQ(is_opaque, bitmap->isOpaque());
346 Premultiply(*bitmap);
392 bitmap_ = new Bitmap(*context_, size_, size_);
434 // Bitmap created inside context_.
435 Bitmap* bitmap_;
803 SkBitmap bitmap;
804 LoadPngFileToSkBitmap(test_file(L"bitmap_opaque.png"), &bitmap, true);
805 vcanvas_->drawBitmap(bitmap, 13, 3, NULL);
806 pcanvas_->drawBitmap(bitmap, 13, 3, NULL);
811 SkBitmap bitmap;
812 LoadPngFileToSkBitmap(test_file(L"bitmap_alpha.png"), &bitmap, false);
813 vcanvas_->drawBitmap(bitmap, 5, 15, NULL);
814 pcanvas_->drawBitmap(bitmap, 5, 15, NULL);
820 SkBitmap bitmap;
821 LoadPngFileToSkBitmap(test_file(L"..\\bitmaps\\bitmap_opaque.png"), &bitmap,
831 vcanvas_->drawBitmap(bitmap, 13, 3, NULL);
832 pcanvas_->drawBitmap(bitmap, 13, 3, NULL);
837 SkBitmap bitmap;
838 LoadPngFileToSkBitmap(test_file(L"..\\bitmaps\\bitmap_opaque.png"), &bitmap,
845 vcanvas_->drawBitmap(bitmap, 14, 3, NULL);
846 pcanvas_->drawBitmap(bitmap, 14, 3, NULL);
851 SkBitmap bitmap;
852 LoadPngFileToSkBitmap(test_file(L"..\\bitmaps\\bitmap_opaque.png"), &bitmap,
867 vcanvas_->drawBitmap(bitmap, 15, 3, NULL);
868 pcanvas_->drawBitmap(bitmap, 15, 3, NULL);
873 SkBitmap bitmap;
874 LoadPngFileToSkBitmap(test_file(L"..\\bitmaps\\bitmap_opaque.png"), &bitmap,
889 vcanvas_->drawBitmap(bitmap, 15, 3, NULL);
890 pcanvas_->drawBitmap(bitmap, 15, 3, NULL);
895 SkBitmap bitmap;
896 LoadPngFileToSkBitmap(test_file(L"..\\bitmaps\\bitmap_opaque.png"), &bitmap,
909 vcanvas_->drawBitmap(bitmap, 15, 3, NULL);
910 pcanvas_->drawBitmap(bitmap, 15, 3, NULL);
915 vcanvas_->drawBitmap(bitmap, 55, 3, NULL);
916 pcanvas_->drawBitmap(bitmap, 55, 3, NULL);
923 SkBitmap bitmap;
924 LoadPngFileToSkBitmap(test_file(L"..\\bitmaps\\bitmap_opaque.png"), &bitmap,
929 vcanvas_->drawBitmap(bitmap, 0, 0, NULL);
930 pcanvas_->drawBitmap(bitmap, 0, 0, NULL);
936 vcanvas_->drawBitmap(bitmap, 0, 0, NULL);
937 pcanvas_->drawBitmap(bitmap, 0, 0, NULL);
951 vcanvas_->drawBitmap(bitmap, 1, 1, NULL);
952 pcanvas_->drawBitmap(bitmap, 1, 1, NULL);
961 vcanvas_->drawBitmap(bitmap, 20, -50, NULL);
962 pcanvas_->drawBitmap(bitmap, 20, -50, NULL);