summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Fl_Double_Window.cxx2
-rw-r--r--src/Fl_Image.cxx2
-rw-r--r--src/Fl_Quartz_Printer.mm2
-rw-r--r--src/Fl_cocoa.mm8
-rw-r--r--src/fl_draw_image_mac.cxx2
-rw-r--r--src/fl_scroll_area.cxx2
6 files changed, 9 insertions, 9 deletions
diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx
index 10691960d..99ba3e7d1 100644
--- a/src/Fl_Double_Window.cxx
+++ b/src/Fl_Double_Window.cxx
@@ -283,7 +283,7 @@ void Fl_Quartz_Graphics_Driver::copy_offscreen(int x,int y,int w,int h,Fl_Offscr
CGImageRef img = CGImageCreate( sw, sh, 8, 4*8, 4*sw, lut, alpha,
src_bytes, 0L, false, kCGRenderingIntentDefault);
// fl_push_clip();
- CGRect rect = { { x, y }, { w, h } };
+ CGRect rect = CGRectMake(x, y, w, h);
Fl_X::q_begin_image(rect, srcx, srcy, sw, sh);
CGContextDrawImage(fl_gc, rect, img);
Fl_X::q_end_image();
diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx
index 909994915..24d318cdb 100644
--- a/src/Fl_Image.cxx
+++ b/src/Fl_Image.cxx
@@ -587,7 +587,7 @@ void Fl_Quartz_Graphics_Driver::draw(Fl_RGB_Image *img, int XP, int YP, int WP,
CGColorSpaceRelease(lut);
CGDataProviderRelease(src);
}
- CGRect rect = { { X, Y }, { W, H } };
+ CGRect rect = CGRectMake(X, Y, W, H);
Fl_X::q_begin_image(rect, cx, cy, img->w(), img->h());
CGContextDrawImage(fl_gc, rect, (CGImageRef)img->id_);
Fl_X::q_end_image();
diff --git a/src/Fl_Quartz_Printer.mm b/src/Fl_Quartz_Printer.mm
index 2a60e4416..9770532f6 100644
--- a/src/Fl_Quartz_Printer.mm
+++ b/src/Fl_Quartz_Printer.mm
@@ -327,7 +327,7 @@ void Fl_System_Printer::print_window_part(Fl_Window *win, int x, int y, int w, i
CGImageRef img = Fl_X::CGImage_from_window_rect(win, x, y, w, h);
if (save_front != win) save_front->show();
current->set_current();
- CGRect rect = { { delta_x, delta_y }, { w, h } };
+ CGRect rect = CGRectMake(delta_x, delta_y, w, h);
Fl_X::q_begin_image(rect, 0, 0, w, h);
CGContextDrawImage(fl_gc, rect, img);
Fl_X::q_end_image();
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 938ac4c67..8a53d2c15 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -3051,8 +3051,8 @@ void Fl_Window::size_range_() {
int bx, by, bt;
get_window_frame_sizes(bx, by, bt);
size_range_set = 1;
- NSSize minSize = { minw, minh + bt };
- NSSize maxSize = { maxw?maxw:32000, maxh?maxh + bt:32000 };
+ NSSize minSize = NSMakeSize(minw, minh + bt);
+ NSSize maxSize = NSMakeSize(maxw?maxw:32000, maxh?maxh + bt:32000);
if (i && i->xid) {
[i->xid setMinSize:minSize];
[i->xid setMaxSize:maxSize];
@@ -4392,7 +4392,7 @@ void Fl_Paged_Device::print_window(Fl_Window *win, int x_offset, int y_offset)
win->label(title); // put back the window title
this->set_current(); // back to the Fl_Paged_Device
if (img && to_quartz) { // print the title bar
- CGRect rect = { { x_offset, y_offset }, { win->w(), bt } };
+ CGRect rect = NSMakeRect(x_offset, y_offset, win->w(), bt);
Fl_X::q_begin_image(rect, 0, 0, win->w(), bt);
CGContextDrawImage(fl_gc, rect, img);
Fl_X::q_end_image();
@@ -4417,7 +4417,7 @@ void Fl_Paged_Device::print_window(Fl_Window *win, int x_offset, int y_offset)
NSSize size = [title_s sizeWithAttributes:attr];
int x = x_offset + win->w()/2 - size.width/2;
if (x < x_offset+skip) x = x_offset+skip;
- NSRect r = {{x, y_offset+bt/2+4}, {win->w() - skip, bt}};
+ NSRect r = NSMakeRect(x, y_offset+bt/2+4, win->w() - skip, bt);
[[NSGraphicsContext currentContext] setShouldAntialias:YES];
[title_s drawWithRect:r options:(NSStringDrawingOptions)0 attributes:attr]; // 10.4
[[NSGraphicsContext currentContext] setShouldAntialias:NO];
diff --git a/src/fl_draw_image_mac.cxx b/src/fl_draw_image_mac.cxx
index 3a177ff1e..87fcbc068 100644
--- a/src/fl_draw_image_mac.cxx
+++ b/src/fl_draw_image_mac.cxx
@@ -88,7 +88,7 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
src, 0L, false, kCGRenderingIntentDefault);
// draw the image into the destination context
if (img) {
- CGRect rect = { { X, Y }, { W, H } };
+ CGRect rect = CGRectMake( X, Y, W, H);
Fl_X::q_begin_image(rect, 0, 0, W, H);
CGContextDrawImage(fl_gc, rect, img);
Fl_X::q_end_image();
diff --git a/src/fl_scroll_area.cxx b/src/fl_scroll_area.cxx
index a8cba57c4..eecf1847a 100644
--- a/src/fl_scroll_area.cxx
+++ b/src/fl_scroll_area.cxx
@@ -144,7 +144,7 @@ void fl_scroll(int X, int Y, int W, int H, int dx, int dy,
#elif defined(__APPLE_QUARTZ__)
CGImageRef img = Fl_X::CGImage_from_window_rect(Fl_Window::current(), src_x, src_y, src_w, src_h);
if (img) {
- CGRect rect = { { dest_x, dest_y }, { src_w, src_h } };
+ CGRect rect = CGRectMake(dest_x, dest_y, src_w, src_h);
Fl_X::q_begin_image(rect, 0, 0, src_w, src_h);
CGContextDrawImage(fl_gc, rect, img);
Fl_X::q_end_image();