325
325
surface->win32.extents.y = 0;
326
326
surface->win32.extents.width = width;
327
327
surface->win32.extents.height = height;
328
surface->win32.x_ofs = 0;
328
surface->win32.x_ofs = 0;
329
329
surface->win32.y_ofs = 0;
331
331
surface->initial_clip_rgn = NULL;
634
634
surface->win32.extents.height = rect.bottom - rect.top;
636
636
/* On multi-monitor setup, under Windows, the primary monitor always
637
* have origin (0,0). Any monitors that extends to the left or above
637
* have origin (0,0). Any monitors that extends to the left or above
638
638
* will have coordinates in the negative range. Take this into
639
* account, by forcing our Win32 surface to start at extent (0,0) and
640
* using a device offset. Cairo does not handle extents with negative
639
* account, by forcing our Win32 surface to start at extent (0,0) and
640
* using a device offset. Cairo does not handle extents with negative
643
643
surface->win32.x_ofs = 0;
644
644
surface->win32.y_ofs = 0;
645
645
if ((surface->win32.extents.x < 0) ||
646
646
(surface->win32.extents.y < 0)) {
647
647
/* Negative offsets occurs for (and ONLY for) the desktop DC (virtual
648
* desktop), when a monitor extend to the left or above the primary
651
* More info @ https://www.microsoft.com/msj/0697/monitor/monitor.aspx
653
* Note that any other DC, including memory DC created with
648
* desktop), when a monitor extend to the left or above the primary
651
* More info @ https://www.microsoft.com/msj/0697/monitor/monitor.aspx
653
* Note that any other DC, including memory DC created with
654
654
* CreateCompatibleDC(<virtual desktop DC>) will have extents in the
655
* positive range. This will be taken into account later when we perform
656
* raster operations between the DC (may have to perform offset
655
* positive range. This will be taken into account later when we perform
656
* raster operations between the DC (may have to perform offset
659
659
surface->win32.x_ofs = surface->win32.extents.x;