diff options
| author | Manolo Gouy <Manolo> | 2018-03-22 16:38:38 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-03-22 16:38:38 +0000 |
| commit | 9f9631e6856f56d9439ae5f91ed94dda0f19b568 (patch) | |
| tree | 9a7be15f89cf25588f6ebd4e27a7fcd5ea47f8d8 /src/drivers/Quartz | |
| parent | 0b8116ff72145816c3e1d4909038c126327e7bf2 (diff) | |
Rename Fl_Image::pixel_w() and pixel_h() to Fl_Image::data_w() and data_h().
The docs of class Fl_Image and of Fl_Image::scale() are beefed up.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12784 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Quartz')
| -rw-r--r-- | src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx index 1bd4d8fbc..db00f7935 100644 --- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx @@ -162,7 +162,7 @@ void Fl_Quartz_Graphics_Driver::draw(Fl_RGB_Image *img, int XP, int YP, int WP, if (!cgimg) { CGColorSpaceRef lut = img->d()<=2 ? CGColorSpaceCreateDeviceGray() : CGColorSpaceCreateDeviceRGB(); int ld = img->ld(); - if (!ld) ld = img->pixel_w() * img->d(); + if (!ld) ld = img->data_w() * img->d(); CGDataProviderRef src; if ( has_feature(PRINTER) ) { // When printing, the data at img->array are used when the printed page is completed, @@ -172,16 +172,16 @@ void Fl_Quartz_Graphics_Driver::draw(Fl_RGB_Image *img, int XP, int YP, int WP, // is used to avoid repeating the copy operation if img is printed again. // The CGImage data provider deletes the copy at the latest of these two events: // deletion of img, and completion of the page where img was printed. - size_t total = ld * img->pixel_h(); + size_t total = ld * img->data_h(); uchar *copy = new uchar[total]; memcpy(copy, img->array, total); src = CGDataProviderCreateWithData(NULL, copy, total, dataReleaseCB); *Fl_Graphics_Driver::mask(img) = 1; } else { // the CGImage data provider must not release the image data. - src = CGDataProviderCreateWithData(NULL, img->array, ld * img->pixel_h(), NULL); + src = CGDataProviderCreateWithData(NULL, img->array, ld * img->data_h(), NULL); } - cgimg = CGImageCreate(img->pixel_w(), img->pixel_h(), 8, img->d()*8, ld, + cgimg = CGImageCreate(img->data_w(), img->data_h(), 8, img->d()*8, ld, lut, (img->d()&1)?kCGImageAlphaNone:kCGImageAlphaLast, src, 0L, false, kCGRenderingIntentDefault); *Fl_Graphics_Driver::id(img) = (fl_uintptr_t)cgimg; @@ -230,7 +230,7 @@ void Fl_Quartz_Graphics_Driver::uncache(Fl_RGB_Image*, fl_uintptr_t &id_, fl_uin } fl_uintptr_t Fl_Quartz_Graphics_Driver::cache(Fl_Bitmap *bm) { - return (fl_uintptr_t)create_bitmask(bm->pixel_w(), bm->pixel_h(), bm->array); + return (fl_uintptr_t)create_bitmask(bm->data_w(), bm->data_h(), bm->array); } @@ -239,7 +239,7 @@ static void pmProviderRelease (void *ctxt, const void *data, size_t size) { } fl_uintptr_t Fl_Quartz_Graphics_Driver::cache(Fl_Pixmap *img) { - Fl_Image_Surface *surf = new Fl_Image_Surface(img->pixel_w(), img->pixel_h()); + Fl_Image_Surface *surf = new Fl_Image_Surface(img->data_w(), img->data_h()); Fl_Surface_Device::push_current(surf); fl_draw_pixmap(img->data(), 0, 0, FL_BLACK); CGContextRef src = surf->get_offscreen_before_delete(); |
