Moved DC origin into device-specific structure.
Fixed handling of DC origin in X11 driver.
This commit is contained in:
parent
d2e22f93ac
commit
d3cab1857a
@ -143,6 +143,7 @@ static struct graphics_driver *create_driver( HMODULE module )
|
|||||||
GET_FUNC(SetBitmapBits);
|
GET_FUNC(SetBitmapBits);
|
||||||
GET_FUNC(SetBkColor);
|
GET_FUNC(SetBkColor);
|
||||||
GET_FUNC(SetBkMode);
|
GET_FUNC(SetBkMode);
|
||||||
|
GET_FUNC(SetDCOrg);
|
||||||
GET_FUNC(SetDIBColorTable);
|
GET_FUNC(SetDIBColorTable);
|
||||||
GET_FUNC(SetDIBits);
|
GET_FUNC(SetDIBits);
|
||||||
GET_FUNC(SetDIBitsToDevice);
|
GET_FUNC(SetDIBitsToDevice);
|
||||||
|
@ -111,6 +111,7 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
|
|||||||
NULL, /* pSetBitmapBits */
|
NULL, /* pSetBitmapBits */
|
||||||
EMFDRV_SetBkColor, /* pSetBkColor */
|
EMFDRV_SetBkColor, /* pSetBkColor */
|
||||||
EMFDRV_SetBkMode, /* pSetBkMode */
|
EMFDRV_SetBkMode, /* pSetBkMode */
|
||||||
|
NULL, /* pSetDCOrg */
|
||||||
NULL, /* pSetDIBColorTable */
|
NULL, /* pSetDIBColorTable */
|
||||||
NULL, /* pSetDIBits */
|
NULL, /* pSetDIBits */
|
||||||
NULL, /* pSetDIBitsToDevice */
|
NULL, /* pSetDIBitsToDevice */
|
||||||
|
@ -111,6 +111,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
|
|||||||
NULL, /* pSetBitmapBits */
|
NULL, /* pSetBitmapBits */
|
||||||
MFDRV_SetBkColor, /* pSetBkColor */
|
MFDRV_SetBkColor, /* pSetBkColor */
|
||||||
MFDRV_SetBkMode, /* pSetBkMode */
|
MFDRV_SetBkMode, /* pSetBkMode */
|
||||||
|
NULL, /* pSetDCOrg */
|
||||||
NULL, /* pSetDIBColorTable */
|
NULL, /* pSetDIBColorTable */
|
||||||
NULL, /* pSetDIBits */
|
NULL, /* pSetDIBits */
|
||||||
MFDRV_SetDIBitsToDevice, /* pSetDIBitsToDevice */
|
MFDRV_SetDIBitsToDevice, /* pSetDIBitsToDevice */
|
||||||
|
@ -36,10 +36,10 @@ WIN16DRV_LineTo( PHYSDEV dev, INT x, INT y )
|
|||||||
DC *dc = physDev->dc;
|
DC *dc = physDev->dc;
|
||||||
POINT16 points[2];
|
POINT16 points[2];
|
||||||
|
|
||||||
points[0].x = dc->DCOrgX + XLPTODP( dc, dc->CursPosX );
|
points[0].x = physDev->org.x + XLPTODP( dc, dc->CursPosX );
|
||||||
points[0].y = dc->DCOrgY + YLPTODP( dc, dc->CursPosY );
|
points[0].y = physDev->org.y + YLPTODP( dc, dc->CursPosY );
|
||||||
points[1].x = dc->DCOrgX + XLPTODP( dc, x );
|
points[1].x = physDev->org.x + XLPTODP( dc, x );
|
||||||
points[1].y = dc->DCOrgY + YLPTODP( dc, y );
|
points[1].y = physDev->org.y + YLPTODP( dc, y );
|
||||||
bRet = PRTDRV_Output(physDev->segptrPDEVICE,
|
bRet = PRTDRV_Output(physDev->segptrPDEVICE,
|
||||||
OS_POLYLINE, 2, points,
|
OS_POLYLINE, 2, points,
|
||||||
physDev->PenInfo,
|
physDev->PenInfo,
|
||||||
@ -63,8 +63,8 @@ WIN16DRV_Rectangle(PHYSDEV dev, INT left, INT top, INT right, INT bottom)
|
|||||||
BOOL bRet = 0;
|
BOOL bRet = 0;
|
||||||
POINT16 points[2];
|
POINT16 points[2];
|
||||||
|
|
||||||
TRACE("In WIN16DRV_Rectangle, x %d y %d DCOrgX %d y %d\n",
|
TRACE("In WIN16DRV_Rectangle, x %d y %d DCOrgX %ld y %ld\n",
|
||||||
left, top, dc->DCOrgX, dc->DCOrgY);
|
left, top, physDev->org.x, physDev->org.y);
|
||||||
TRACE("In WIN16DRV_Rectangle, VPortOrgX %d y %d\n",
|
TRACE("In WIN16DRV_Rectangle, VPortOrgX %d y %d\n",
|
||||||
dc->vportOrgX, dc->vportOrgY);
|
dc->vportOrgX, dc->vportOrgY);
|
||||||
points[0].x = XLPTODP(dc, left);
|
points[0].x = XLPTODP(dc, left);
|
||||||
@ -163,7 +163,8 @@ WIN16DRV_Ellipse(PHYSDEV dev, INT left, INT top, INT right, INT bottom)
|
|||||||
BOOL bRet = 0;
|
BOOL bRet = 0;
|
||||||
POINT16 points[2];
|
POINT16 points[2];
|
||||||
|
|
||||||
TRACE("In WIN16DRV_Ellipse, x %d y %d DCOrgX %d y %d\n", left, top, dc->DCOrgX, dc->DCOrgY);
|
TRACE("In WIN16DRV_Ellipse, x %d y %d DCOrgX %ld y %ld\n",
|
||||||
|
left, top, physDev->org.x, physDev->org.y);
|
||||||
TRACE("In WIN16DRV_Ellipse, VPortOrgX %d y %d\n", dc->vportOrgX, dc->vportOrgY);
|
TRACE("In WIN16DRV_Ellipse, VPortOrgX %d y %d\n", dc->vportOrgX, dc->vportOrgY);
|
||||||
points[0].x = XLPTODP(dc, left);
|
points[0].x = XLPTODP(dc, left);
|
||||||
points[0].y = YLPTODP(dc, top);
|
points[0].y = YLPTODP(dc, top);
|
||||||
@ -178,11 +179,3 @@ WIN16DRV_Ellipse(PHYSDEV dev, INT left, INT top, INT right, INT bottom)
|
|||||||
win16drv_SegPtr_DrawMode, dc->hClipRgn);
|
win16drv_SegPtr_DrawMode, dc->hClipRgn);
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ SEGPTR win16drv_SegPtr_DrawMode;
|
|||||||
LPDRAWMODE win16drv_DrawModeP;
|
LPDRAWMODE win16drv_DrawModeP;
|
||||||
|
|
||||||
|
|
||||||
static BOOL WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
|
static BOOL WIN16DRV_CreateDC( DC *dc, PHYSDEV *pdev, LPCSTR driver, LPCSTR device,
|
||||||
LPCSTR output, const DEVMODEA* initData );
|
LPCSTR output, const DEVMODEA* initData );
|
||||||
static INT WIN16DRV_GetDeviceCaps( PHYSDEV dev, INT cap );
|
static INT WIN16DRV_GetDeviceCaps( PHYSDEV dev, INT cap );
|
||||||
static INT WIN16DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_data,
|
static INT WIN16DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_data,
|
||||||
@ -139,6 +139,7 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
|
|||||||
NULL, /* pSetBitmapBits */
|
NULL, /* pSetBitmapBits */
|
||||||
NULL, /* pSetBkColor */
|
NULL, /* pSetBkColor */
|
||||||
NULL, /* pSetBkMode */
|
NULL, /* pSetBkMode */
|
||||||
|
NULL, /* pSetDCOrg */
|
||||||
NULL, /* pSetDIBColorTable */
|
NULL, /* pSetDIBColorTable */
|
||||||
NULL, /* pSetDIBits */
|
NULL, /* pSetDIBits */
|
||||||
NULL, /* pSetDIBitsToDevice */
|
NULL, /* pSetDIBitsToDevice */
|
||||||
@ -240,7 +241,7 @@ void InitDrawMode(LPDRAWMODE lpDrawMode)
|
|||||||
lpDrawMode->eMiterLimit = 1;
|
lpDrawMode->eMiterLimit = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
|
BOOL WIN16DRV_CreateDC( DC *dc, PHYSDEV *pdev, LPCSTR driver, LPCSTR device, LPCSTR output,
|
||||||
const DEVMODEA* initData )
|
const DEVMODEA* initData )
|
||||||
{
|
{
|
||||||
LOADED_PRINTER_DRIVER *pLPD;
|
LOADED_PRINTER_DRIVER *pLPD;
|
||||||
@ -254,9 +255,10 @@ BOOL WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
|
|||||||
|
|
||||||
physDev = (WIN16DRV_PDEVICE *)HeapAlloc( GetProcessHeap(), 0, sizeof(*physDev) );
|
physDev = (WIN16DRV_PDEVICE *)HeapAlloc( GetProcessHeap(), 0, sizeof(*physDev) );
|
||||||
if (!physDev) return FALSE;
|
if (!physDev) return FALSE;
|
||||||
dc->physDev = (PHYSDEV)physDev;
|
*pdev = (PHYSDEV)physDev;
|
||||||
physDev->hdc = dc->hSelf;
|
physDev->hdc = dc->hSelf;
|
||||||
physDev->dc = dc;
|
physDev->dc = dc;
|
||||||
|
physDev->org.x = physDev->org.y = 0;
|
||||||
|
|
||||||
pLPD = LoadPrinterDriver(driver);
|
pLPD = LoadPrinterDriver(driver);
|
||||||
if (pLPD == NULL)
|
if (pLPD == NULL)
|
||||||
|
@ -207,6 +207,7 @@ typedef struct
|
|||||||
LPLOGPEN16 PenInfo; /* Current pen realized by printer driver */
|
LPLOGPEN16 PenInfo; /* Current pen realized by printer driver */
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
DC *dc;
|
DC *dc;
|
||||||
|
POINT org; /* Device origin */
|
||||||
DeviceCaps DevCaps; /* Device caps */
|
DeviceCaps DevCaps; /* Device caps */
|
||||||
} WIN16DRV_PDEVICE;
|
} WIN16DRV_PDEVICE;
|
||||||
|
|
||||||
@ -300,4 +301,3 @@ extern SEGPTR win16drv_SegPtr_DrawMode;
|
|||||||
extern LPDRAWMODE win16drv_DrawModeP;
|
extern LPDRAWMODE win16drv_DrawModeP;
|
||||||
|
|
||||||
#endif /* __WINE_WIN16DRV_H */
|
#endif /* __WINE_WIN16DRV_H */
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ BOOL TTYDRV_GDI_Initialize(void)
|
|||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* TTYDRV_DC_CreateDC
|
* TTYDRV_DC_CreateDC
|
||||||
*/
|
*/
|
||||||
BOOL TTYDRV_DC_CreateDC(DC *dc, LPCSTR driver, LPCSTR device,
|
BOOL TTYDRV_DC_CreateDC(DC *dc, TTYDRV_PDEVICE **pdev, LPCSTR driver, LPCSTR device,
|
||||||
LPCSTR output, const DEVMODEA *initData)
|
LPCSTR output, const DEVMODEA *initData)
|
||||||
{
|
{
|
||||||
TTYDRV_PDEVICE *physDev;
|
TTYDRV_PDEVICE *physDev;
|
||||||
@ -48,15 +48,14 @@ BOOL TTYDRV_DC_CreateDC(DC *dc, LPCSTR driver, LPCSTR device,
|
|||||||
dc, debugstr_a(driver), debugstr_a(device),
|
dc, debugstr_a(driver), debugstr_a(device),
|
||||||
debugstr_a(output), initData);
|
debugstr_a(output), initData);
|
||||||
|
|
||||||
dc->physDev = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
physDev = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(TTYDRV_PDEVICE));
|
||||||
sizeof(TTYDRV_PDEVICE));
|
if(!physDev) {
|
||||||
if(!dc->physDev) {
|
|
||||||
ERR("Can't allocate physDev\n");
|
ERR("Can't allocate physDev\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
physDev = (TTYDRV_PDEVICE *) dc->physDev;
|
*pdev = physDev;
|
||||||
physDev->hdc = dc->hSelf;
|
physDev->hdc = dc->hSelf;
|
||||||
physDev->dc = dc;
|
physDev->org.x = physDev->org.y = 0;
|
||||||
|
|
||||||
if(dc->flags & DC_MEMORY){
|
if(dc->flags & DC_MEMORY){
|
||||||
physDev->window = NULL;
|
physDev->window = NULL;
|
||||||
@ -80,7 +79,6 @@ BOOL TTYDRV_DC_DeleteDC(TTYDRV_PDEVICE *physDev)
|
|||||||
{
|
{
|
||||||
TRACE("(%x)\n", physDev->hdc);
|
TRACE("(%x)\n", physDev->hdc);
|
||||||
|
|
||||||
physDev->dc->physDev = NULL;
|
|
||||||
HeapFree( GetProcessHeap(), 0, physDev );
|
HeapFree( GetProcessHeap(), 0, physDev );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -167,3 +165,25 @@ INT TTYDRV_GetDeviceCaps( TTYDRV_PDEVICE *physDev, INT cap )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GetDCOrgEx (TTYDRV.@)
|
||||||
|
*/
|
||||||
|
BOOL TTYDRV_GetDCOrgEx( TTYDRV_PDEVICE *physDev, LPPOINT pt )
|
||||||
|
{
|
||||||
|
*pt = physDev->org;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SetDCOrg (TTYDRV.@)
|
||||||
|
*/
|
||||||
|
DWORD TTYDRV_SetDCOrg( TTYDRV_PDEVICE *physDev, INT x, INT y )
|
||||||
|
{
|
||||||
|
DWORD ret = MAKELONG( physDev->org.x, physDev->org.y );
|
||||||
|
physDev->org.x = x;
|
||||||
|
physDev->org.y = y;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
@ -84,17 +84,22 @@ BOOL TTYDRV_DC_LineTo(TTYDRV_PDEVICE *physDev, INT x, INT y)
|
|||||||
{
|
{
|
||||||
#ifdef WINE_CURSES
|
#ifdef WINE_CURSES
|
||||||
INT row1, col1, row2, col2;
|
INT row1, col1, row2, col2;
|
||||||
DC *dc = physDev->dc;
|
POINT pt[2];
|
||||||
|
|
||||||
TRACE("(%x, %d, %d)\n", physDev->hdc, x, y);
|
TRACE("(%x, %d, %d)\n", physDev->hdc, x, y);
|
||||||
|
|
||||||
if(!physDev->window)
|
if(!physDev->window)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
row1 = (dc->DCOrgY + XLPTODP(dc, dc->CursPosY)) / physDev->cellHeight;
|
GetCurrentPositionEx( physDev->hdc, &pt[0] );
|
||||||
col1 = (dc->DCOrgX + XLPTODP(dc, dc->CursPosX)) / physDev->cellWidth;
|
pt[1].x = x;
|
||||||
row2 = (dc->DCOrgY + XLPTODP(dc, y)) / physDev->cellHeight;
|
pt[1].y = y;
|
||||||
col2 = (dc->DCOrgX + XLPTODP(dc, x)) / physDev->cellWidth;
|
LPtoDP( physDev->hdc, pt, 2 );
|
||||||
|
|
||||||
|
row1 = (physDev->org.y + pt[0].y) / physDev->cellHeight;
|
||||||
|
col1 = (physDev->org.x + pt[0].x) / physDev->cellWidth;
|
||||||
|
row2 = (physDev->org.y + pt[1].y) / physDev->cellHeight;
|
||||||
|
col2 = (physDev->org.x + pt[1].x) / physDev->cellWidth;
|
||||||
|
|
||||||
if(row1 > row2) {
|
if(row1 > row2) {
|
||||||
INT tmp = row1;
|
INT tmp = row1;
|
||||||
@ -190,17 +195,22 @@ BOOL TTYDRV_DC_Rectangle(TTYDRV_PDEVICE *physDev, INT left, INT top, INT right,
|
|||||||
{
|
{
|
||||||
#ifdef WINE_CURSES
|
#ifdef WINE_CURSES
|
||||||
INT row1, col1, row2, col2;
|
INT row1, col1, row2, col2;
|
||||||
DC *dc = physDev->dc;
|
RECT rect;
|
||||||
|
|
||||||
TRACE("(%x, %d, %d, %d, %d)\n", physDev->hdc, left, top, right, bottom);
|
TRACE("(%x, %d, %d, %d, %d)\n", physDev->hdc, left, top, right, bottom);
|
||||||
|
|
||||||
if(!physDev->window)
|
if(!physDev->window)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
row1 = (dc->DCOrgY + XLPTODP(dc, top)) / physDev->cellHeight;
|
rect.left = left;
|
||||||
col1 = (dc->DCOrgX + XLPTODP(dc, left)) / physDev->cellWidth;
|
rect.top = top;
|
||||||
row2 = (dc->DCOrgY + XLPTODP(dc, bottom)) / physDev->cellHeight;
|
rect.right = right;
|
||||||
col2 = (dc->DCOrgX + XLPTODP(dc, right)) / physDev->cellWidth;
|
rect.bottom = bottom;
|
||||||
|
LPtoDP( physDev->hdc, (POINT *)&rect, 2 );
|
||||||
|
row1 = (physDev->org.y + rect.top) / physDev->cellHeight;
|
||||||
|
col1 = (physDev->org.x + rect.left) / physDev->cellWidth;
|
||||||
|
row2 = (physDev->org.y + rect.bottom) / physDev->cellHeight;
|
||||||
|
col2 = (physDev->org.x + rect.right) / physDev->cellWidth;
|
||||||
|
|
||||||
if(row1 > row2) {
|
if(row1 > row2) {
|
||||||
INT tmp = row1;
|
INT tmp = row1;
|
||||||
@ -259,15 +269,18 @@ COLORREF TTYDRV_DC_SetPixel(TTYDRV_PDEVICE *physDev, INT x, INT y, COLORREF colo
|
|||||||
{
|
{
|
||||||
#ifdef WINE_CURSES
|
#ifdef WINE_CURSES
|
||||||
INT row, col;
|
INT row, col;
|
||||||
DC *dc = physDev->dc;
|
POINT pt;
|
||||||
|
|
||||||
TRACE("(%x, %d, %d, 0x%08lx)\n", physDev->hdc, x, y, color);
|
TRACE("(%x, %d, %d, 0x%08lx)\n", physDev->hdc, x, y, color);
|
||||||
|
|
||||||
if(!physDev->window)
|
if(!physDev->window)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
row = (dc->DCOrgY + XLPTODP(dc, y)) / physDev->cellHeight;
|
pt.x = x;
|
||||||
col = (dc->DCOrgX + XLPTODP(dc, x)) / physDev->cellWidth;
|
pt.y = y;
|
||||||
|
LPtoDP( physDev->hdc, &pt, 1 );
|
||||||
|
row = (physDev->org.y + pt.y) / physDev->cellHeight;
|
||||||
|
col = (physDev->org.x + pt.x) / physDev->cellWidth;
|
||||||
|
|
||||||
mvwaddch(physDev->window, row, col, ACS_BULLET);
|
mvwaddch(physDev->window, row, col, ACS_BULLET);
|
||||||
wrefresh(physDev->window);
|
wrefresh(physDev->window);
|
||||||
@ -328,7 +341,8 @@ BOOL TTYDRV_DC_ExtTextOut(TTYDRV_PDEVICE *physDev, INT x, INT y, UINT flags,
|
|||||||
INT row, col;
|
INT row, col;
|
||||||
LPSTR ascii;
|
LPSTR ascii;
|
||||||
DWORD len;
|
DWORD len;
|
||||||
DC *dc = physDev->dc;
|
POINT pt;
|
||||||
|
UINT text_align = GetTextAlign( physDev->hdc );
|
||||||
|
|
||||||
TRACE("(%x, %d, %d, 0x%08x, %p, %s, %d, %p)\n",
|
TRACE("(%x, %d, %d, 0x%08x, %p, %s, %d, %p)\n",
|
||||||
physDev->hdc, x, y, flags, lpRect, debugstr_wn(str, count), count, lpDx);
|
physDev->hdc, x, y, flags, lpRect, debugstr_wn(str, count), count, lpDx);
|
||||||
@ -336,17 +350,14 @@ BOOL TTYDRV_DC_ExtTextOut(TTYDRV_PDEVICE *physDev, INT x, INT y, UINT flags,
|
|||||||
if(!physDev->window)
|
if(!physDev->window)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
pt.x = x;
|
||||||
|
pt.y = y;
|
||||||
/* FIXME: Is this really correct? */
|
/* FIXME: Is this really correct? */
|
||||||
if(dc->textAlign & TA_UPDATECP) {
|
if(text_align & TA_UPDATECP) GetCurrentPositionEx( physDev->hdc, &pt );
|
||||||
x = dc->CursPosX;
|
|
||||||
y = dc->CursPosY;
|
|
||||||
}
|
|
||||||
|
|
||||||
x = XLPTODP(dc, x);
|
LPtoDP( physDev->hdc, &pt, 1 );
|
||||||
y = YLPTODP(dc, y);
|
row = (physDev->org.y + pt.y) / physDev->cellHeight;
|
||||||
|
col = (physDev->org.x + pt.x) / physDev->cellWidth;
|
||||||
row = (dc->DCOrgY + y) / physDev->cellHeight;
|
|
||||||
col = (dc->DCOrgX + x) / physDev->cellWidth;
|
|
||||||
len = WideCharToMultiByte( CP_ACP, 0, str, count, NULL, 0, NULL, NULL );
|
len = WideCharToMultiByte( CP_ACP, 0, str, count, NULL, 0, NULL, NULL );
|
||||||
ascii = HeapAlloc( GetProcessHeap(), 0, len );
|
ascii = HeapAlloc( GetProcessHeap(), 0, len );
|
||||||
WideCharToMultiByte( CP_ACP, 0, str, count, ascii, len, NULL, NULL );
|
WideCharToMultiByte( CP_ACP, 0, str, count, ascii, len, NULL, NULL );
|
||||||
@ -354,9 +365,12 @@ BOOL TTYDRV_DC_ExtTextOut(TTYDRV_PDEVICE *physDev, INT x, INT y, UINT flags,
|
|||||||
HeapFree( GetProcessHeap(), 0, ascii );
|
HeapFree( GetProcessHeap(), 0, ascii );
|
||||||
wrefresh(physDev->window);
|
wrefresh(physDev->window);
|
||||||
|
|
||||||
if(dc->textAlign & TA_UPDATECP) {
|
if(text_align & TA_UPDATECP)
|
||||||
dc->CursPosX += count * physDev->cellWidth;
|
{
|
||||||
dc->CursPosY += physDev->cellHeight;
|
pt.x += count * physDev->cellWidth;
|
||||||
|
pt.y += physDev->cellHeight;
|
||||||
|
DPtoLP( physDev->hdc, &pt, 1 );
|
||||||
|
MoveToEx( physDev->hdc, pt.x, pt.y, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -61,7 +61,7 @@ typedef struct { int dummy; } WINDOW;
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
DC *dc;
|
POINT org;
|
||||||
WINDOW *window;
|
WINDOW *window;
|
||||||
int cellWidth;
|
int cellWidth;
|
||||||
int cellHeight;
|
int cellHeight;
|
||||||
@ -76,7 +76,6 @@ extern void TTYDRV_BITMAP_DeleteDIBSection(struct tagBITMAPOBJ *bmp);
|
|||||||
|
|
||||||
extern BOOL TTYDRV_DC_Arc(TTYDRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend);
|
extern BOOL TTYDRV_DC_Arc(TTYDRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend);
|
||||||
extern LONG TTYDRV_DC_BitmapBits(HBITMAP hbitmap, void *bits, LONG count, WORD flags);
|
extern LONG TTYDRV_DC_BitmapBits(HBITMAP hbitmap, void *bits, LONG count, WORD flags);
|
||||||
extern BOOL TTYDRV_DC_CreateDC(DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODEA *initData);
|
|
||||||
extern BOOL TTYDRV_DC_DeleteDC(TTYDRV_PDEVICE *physDev);
|
extern BOOL TTYDRV_DC_DeleteDC(TTYDRV_PDEVICE *physDev);
|
||||||
extern BOOL TTYDRV_DC_BitBlt(TTYDRV_PDEVICE *physDevDst, INT xDst, INT yDst, INT width, INT height, TTYDRV_PDEVICE *physDevSrc, INT xSrc, INT ySrc, DWORD rop);
|
extern BOOL TTYDRV_DC_BitBlt(TTYDRV_PDEVICE *physDevDst, INT xDst, INT yDst, INT width, INT height, TTYDRV_PDEVICE *physDevSrc, INT xSrc, INT ySrc, DWORD rop);
|
||||||
extern BOOL TTYDRV_DC_Chord(TTYDRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend);
|
extern BOOL TTYDRV_DC_Chord(TTYDRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend);
|
||||||
|
@ -6,13 +6,14 @@ init TTYDRV_Init
|
|||||||
@ cdecl Arc(ptr long long long long long long long long) TTYDRV_DC_Arc
|
@ cdecl Arc(ptr long long long long long long long long) TTYDRV_DC_Arc
|
||||||
@ cdecl BitBlt(ptr long long long long ptr long long long) TTYDRV_DC_BitBlt
|
@ cdecl BitBlt(ptr long long long long ptr long long long) TTYDRV_DC_BitBlt
|
||||||
@ cdecl Chord(ptr long long long long long long long long) TTYDRV_DC_Chord
|
@ cdecl Chord(ptr long long long long long long long long) TTYDRV_DC_Chord
|
||||||
@ cdecl CreateDC(ptr str str str ptr) TTYDRV_DC_CreateDC
|
@ cdecl CreateDC(ptr ptr str str str ptr) TTYDRV_DC_CreateDC
|
||||||
@ cdecl DeleteDC(ptr) TTYDRV_DC_DeleteDC
|
@ cdecl DeleteDC(ptr) TTYDRV_DC_DeleteDC
|
||||||
@ cdecl Ellipse(ptr long long long long) TTYDRV_DC_Ellipse
|
@ cdecl Ellipse(ptr long long long long) TTYDRV_DC_Ellipse
|
||||||
@ cdecl ExtFloodFill(ptr long long long long) TTYDRV_DC_ExtFloodFill
|
@ cdecl ExtFloodFill(ptr long long long long) TTYDRV_DC_ExtFloodFill
|
||||||
@ cdecl ExtTextOut(ptr long long long ptr ptr long ptr) TTYDRV_DC_ExtTextOut
|
@ cdecl ExtTextOut(ptr long long long ptr ptr long ptr) TTYDRV_DC_ExtTextOut
|
||||||
@ cdecl GetBitmapBits(long ptr long) TTYDRV_GetBitmapBits
|
@ cdecl GetBitmapBits(long ptr long) TTYDRV_GetBitmapBits
|
||||||
@ cdecl GetCharWidth(ptr long long ptr) TTYDRV_DC_GetCharWidth
|
@ cdecl GetCharWidth(ptr long long ptr) TTYDRV_DC_GetCharWidth
|
||||||
|
@ cdecl GetDCOrgEx(ptr ptr) TTYDRV_GetDCOrgEx
|
||||||
@ cdecl GetDeviceCaps(ptr long) TTYDRV_GetDeviceCaps
|
@ cdecl GetDeviceCaps(ptr long) TTYDRV_GetDeviceCaps
|
||||||
@ cdecl GetPixel(ptr long long) TTYDRV_DC_GetPixel
|
@ cdecl GetPixel(ptr long long) TTYDRV_DC_GetPixel
|
||||||
@ cdecl GetSystemPaletteEntries(ptr long long ptr) TTYDRV_GetSystemPaletteEntries
|
@ cdecl GetSystemPaletteEntries(ptr long long ptr) TTYDRV_GetSystemPaletteEntries
|
||||||
@ -30,6 +31,7 @@ init TTYDRV_Init
|
|||||||
@ cdecl RoundRect(ptr long long long long long long) TTYDRV_DC_RoundRect
|
@ cdecl RoundRect(ptr long long long long long long) TTYDRV_DC_RoundRect
|
||||||
@ cdecl SelectFont(ptr long) TTYDRV_SelectFont
|
@ cdecl SelectFont(ptr long) TTYDRV_SelectFont
|
||||||
@ cdecl SetBitmapBits(long ptr long) TTYDRV_SetBitmapBits
|
@ cdecl SetBitmapBits(long ptr long) TTYDRV_SetBitmapBits
|
||||||
|
@ cdecl SetDCOrg(ptr long long) TTYDRV_SetDCOrg
|
||||||
@ cdecl SetDIBitsToDevice(ptr long long long long long long long long ptr ptr long) TTYDRV_DC_SetDIBitsToDevice
|
@ cdecl SetDIBitsToDevice(ptr long long long long long long long long ptr ptr long) TTYDRV_DC_SetDIBitsToDevice
|
||||||
@ cdecl SetPixel(ptr long long long) TTYDRV_DC_SetPixel
|
@ cdecl SetPixel(ptr long long long) TTYDRV_DC_SetPixel
|
||||||
@ cdecl StretchBlt(ptr long long long long ptr long long long long long) TTYDRV_DC_StretchBlt
|
@ cdecl StretchBlt(ptr long long long long ptr long long long long long) TTYDRV_DC_StretchBlt
|
||||||
|
@ -45,7 +45,7 @@ BOOL TTYDRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
|
|||||||
HWND hwndLinkAfter;
|
HWND hwndLinkAfter;
|
||||||
|
|
||||||
#ifdef WINE_CURSES
|
#ifdef WINE_CURSES
|
||||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
WND *wndPtr = WIN_GetPtr( hwnd );
|
||||||
WINDOW *window;
|
WINDOW *window;
|
||||||
INT cellWidth=8, cellHeight=8; /* FIXME: Hardcoded */
|
INT cellWidth=8, cellHeight=8; /* FIXME: Hardcoded */
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ BOOL TTYDRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
|
|||||||
}
|
}
|
||||||
wndPtr->pDriverData = window;
|
wndPtr->pDriverData = window;
|
||||||
}
|
}
|
||||||
WIN_ReleaseWndPtr( wndPtr );
|
WIN_ReleasePtr( wndPtr );
|
||||||
#else /* defined(WINE_CURSES) */
|
#else /* defined(WINE_CURSES) */
|
||||||
FIXME("(%x): stub\n", hwnd);
|
FIXME("(%x): stub\n", hwnd);
|
||||||
#endif /* defined(WINE_CURSES) */
|
#endif /* defined(WINE_CURSES) */
|
||||||
@ -117,14 +117,14 @@ BOOL TTYDRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
|
|||||||
BOOL TTYDRV_DestroyWindow( HWND hwnd )
|
BOOL TTYDRV_DestroyWindow( HWND hwnd )
|
||||||
{
|
{
|
||||||
#ifdef WINE_CURSES
|
#ifdef WINE_CURSES
|
||||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
WND *wndPtr = WIN_GetPtr( hwnd );
|
||||||
WINDOW *window = wndPtr->pDriverData;
|
WINDOW *window = wndPtr->pDriverData;
|
||||||
|
|
||||||
TRACE("(%x)\n", hwnd);
|
TRACE("(%x)\n", hwnd);
|
||||||
|
|
||||||
if (window && window != root_window) delwin(window);
|
if (window && window != root_window) delwin(window);
|
||||||
wndPtr->pDriverData = NULL;
|
wndPtr->pDriverData = NULL;
|
||||||
WIN_ReleaseWndPtr( wndPtr );
|
WIN_ReleasePtr( wndPtr );
|
||||||
#else /* defined(WINE_CURSES) */
|
#else /* defined(WINE_CURSES) */
|
||||||
FIXME("(%x): stub\n", hwnd);
|
FIXME("(%x): stub\n", hwnd);
|
||||||
#endif /* defined(WINE_CURSES) */
|
#endif /* defined(WINE_CURSES) */
|
||||||
@ -367,8 +367,6 @@ static HRGN DCE_GetVisRgn( HWND hwnd, WORD flags, HWND hwndChild, WORD cflags )
|
|||||||
BOOL TTYDRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
|
BOOL TTYDRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
|
||||||
{
|
{
|
||||||
WND *wndPtr = WIN_FindWndPtr(hwnd);
|
WND *wndPtr = WIN_FindWndPtr(hwnd);
|
||||||
DC *dc;
|
|
||||||
BOOL updateVisRgn;
|
|
||||||
HRGN hrgnVisible = 0;
|
HRGN hrgnVisible = 0;
|
||||||
POINT org;
|
POINT org;
|
||||||
|
|
||||||
@ -385,17 +383,9 @@ BOOL TTYDRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
|
|||||||
org.y = wndPtr->rectClient.top;
|
org.y = wndPtr->rectClient.top;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(dc = DC_GetDCPtr( hdc )))
|
SetDCOrg16( hdc, org.x, org.y );
|
||||||
{
|
|
||||||
WIN_ReleaseWndPtr( wndPtr );
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
dc->DCOrgX = org.x;
|
|
||||||
dc->DCOrgY = org.y;
|
|
||||||
updateVisRgn = (dc->flags & DC_DIRTY) != 0;
|
|
||||||
GDI_ReleaseObj( hdc );
|
|
||||||
|
|
||||||
if (updateVisRgn)
|
if (SetHookFlags16( hdc, DCHF_VALIDATEVISRGN )) /* DC was dirty */
|
||||||
{
|
{
|
||||||
if (flags & DCX_PARENTCLIP)
|
if (flags & DCX_PARENTCLIP)
|
||||||
{
|
{
|
||||||
@ -418,7 +408,6 @@ BOOL TTYDRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
|
|||||||
else
|
else
|
||||||
OffsetRgn( hrgnVisible, -wndPtr->rectClient.left,
|
OffsetRgn( hrgnVisible, -wndPtr->rectClient.left,
|
||||||
-wndPtr->rectClient.top );
|
-wndPtr->rectClient.top );
|
||||||
OffsetRgn( hrgnVisible, org.x, org.y );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
hrgnVisible = CreateRectRgn( 0, 0, 0, 0 );
|
hrgnVisible = CreateRectRgn( 0, 0, 0, 0 );
|
||||||
@ -678,7 +667,6 @@ BOOL TTYDRV_SetWindowPos( WINDOWPOS *winpos )
|
|||||||
*/
|
*/
|
||||||
static UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect )
|
static UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect )
|
||||||
{
|
{
|
||||||
WND *wndPtr;
|
|
||||||
UINT swpFlags = 0;
|
UINT swpFlags = 0;
|
||||||
WINDOWPLACEMENT wpl;
|
WINDOWPLACEMENT wpl;
|
||||||
|
|
||||||
@ -691,11 +679,8 @@ static UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect )
|
|||||||
/* If I glark this right, yields an immutable window*/
|
/* If I glark this right, yields an immutable window*/
|
||||||
swpFlags = SWP_NOSIZE | SWP_NOMOVE;
|
swpFlags = SWP_NOSIZE | SWP_NOMOVE;
|
||||||
|
|
||||||
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return 0;
|
|
||||||
|
|
||||||
/*cmd handling goes here. see dlls/x1drv/winpos.c*/
|
/*cmd handling goes here. see dlls/x1drv/winpos.c*/
|
||||||
|
|
||||||
WIN_ReleaseWndPtr( wndPtr );
|
|
||||||
return swpFlags;
|
return swpFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ static void PSDRV_UpdateDevCaps( PSDRV_PDEVICE *physDev )
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* PSDRV_CreateDC
|
* PSDRV_CreateDC
|
||||||
*/
|
*/
|
||||||
BOOL PSDRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
|
BOOL PSDRV_CreateDC( DC *dc, PSDRV_PDEVICE **pdev, LPCSTR driver, LPCSTR device,
|
||||||
LPCSTR output, const DEVMODEA* initData )
|
LPCSTR output, const DEVMODEA* initData )
|
||||||
{
|
{
|
||||||
PSDRV_PDEVICE *physDev;
|
PSDRV_PDEVICE *physDev;
|
||||||
@ -238,9 +238,9 @@ BOOL PSDRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
|
|||||||
/* If no device name was specified, retrieve the device name
|
/* If no device name was specified, retrieve the device name
|
||||||
* from the DEVMODE structure from the DC's physDev.
|
* from the DEVMODE structure from the DC's physDev.
|
||||||
* (See CreateCompatibleDC) */
|
* (See CreateCompatibleDC) */
|
||||||
if ( !device && dc->physDev )
|
if ( !device && *pdev )
|
||||||
{
|
{
|
||||||
physDev = (PSDRV_PDEVICE *)dc->physDev;
|
physDev = *pdev;
|
||||||
device = physDev->Devmode->dmPublic.dmDeviceName;
|
device = physDev->Devmode->dmPublic.dmDeviceName;
|
||||||
}
|
}
|
||||||
pi = PSDRV_FindPrinterInfo(device);
|
pi = PSDRV_FindPrinterInfo(device);
|
||||||
@ -257,7 +257,7 @@ BOOL PSDRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
|
|||||||
physDev = (PSDRV_PDEVICE *)HeapAlloc( PSDRV_Heap, HEAP_ZERO_MEMORY,
|
physDev = (PSDRV_PDEVICE *)HeapAlloc( PSDRV_Heap, HEAP_ZERO_MEMORY,
|
||||||
sizeof(*physDev) );
|
sizeof(*physDev) );
|
||||||
if (!physDev) return FALSE;
|
if (!physDev) return FALSE;
|
||||||
dc->physDev = (PHYSDEV)physDev;
|
*pdev = physDev;
|
||||||
physDev->hdc = dc->hSelf;
|
physDev->hdc = dc->hSelf;
|
||||||
physDev->dc = dc;
|
physDev->dc = dc;
|
||||||
|
|
||||||
@ -300,7 +300,6 @@ BOOL PSDRV_DeleteDC( PSDRV_PDEVICE *physDev )
|
|||||||
|
|
||||||
HeapFree( PSDRV_Heap, 0, physDev->Devmode );
|
HeapFree( PSDRV_Heap, 0, physDev->Devmode );
|
||||||
HeapFree( PSDRV_Heap, 0, physDev->job.output );
|
HeapFree( PSDRV_Heap, 0, physDev->job.output );
|
||||||
physDev->dc->physDev = NULL;
|
|
||||||
HeapFree( PSDRV_Heap, 0, physDev );
|
HeapFree( PSDRV_Heap, 0, physDev );
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -5,7 +5,7 @@ init PSDRV_Init
|
|||||||
|
|
||||||
@ cdecl Arc(ptr long long long long long long long long) PSDRV_Arc
|
@ cdecl Arc(ptr long long long long long long long long) PSDRV_Arc
|
||||||
@ cdecl Chord(ptr long long long long long long long long) PSDRV_Chord
|
@ cdecl Chord(ptr long long long long long long long long) PSDRV_Chord
|
||||||
@ cdecl CreateDC(ptr str str str ptr) PSDRV_CreateDC
|
@ cdecl CreateDC(ptr ptr str str str ptr) PSDRV_CreateDC
|
||||||
@ cdecl DeleteDC(ptr) PSDRV_DeleteDC
|
@ cdecl DeleteDC(ptr) PSDRV_DeleteDC
|
||||||
@ cdecl DeviceCapabilities(ptr ptr ptr long ptr ptr) PSDRV_DeviceCapabilities
|
@ cdecl DeviceCapabilities(ptr ptr ptr long ptr ptr) PSDRV_DeviceCapabilities
|
||||||
@ cdecl Ellipse(ptr long long long long) PSDRV_Ellipse
|
@ cdecl Ellipse(ptr long long long long) PSDRV_Ellipse
|
||||||
|
@ -426,7 +426,7 @@ BOOL X11DRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
|
|||||||
X11DRV_WND_DATA *data = win->pDriverData;
|
X11DRV_WND_DATA *data = win->pDriverData;
|
||||||
Drawable drawable;
|
Drawable drawable;
|
||||||
BOOL visible;
|
BOOL visible;
|
||||||
POINT org;
|
POINT org, drawable_org;
|
||||||
int mode = IncludeInferiors;
|
int mode = IncludeInferiors;
|
||||||
|
|
||||||
/* don't clip siblings if using parent clip region */
|
/* don't clip siblings if using parent clip region */
|
||||||
@ -466,7 +466,9 @@ BOOL X11DRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
|
|||||||
org.x = win->rectWindow.left - win->rectClient.left;
|
org.x = win->rectWindow.left - win->rectClient.left;
|
||||||
org.y = win->rectWindow.top - win->rectClient.top;
|
org.y = win->rectWindow.top - win->rectClient.top;
|
||||||
}
|
}
|
||||||
|
drawable_org = org;
|
||||||
MapWindowPoints( hwnd, parent, &org, 1 );
|
MapWindowPoints( hwnd, parent, &org, 1 );
|
||||||
|
MapWindowPoints( hwnd, 0, &drawable_org, 1 );
|
||||||
/* have to use the parent so that we include siblings */
|
/* have to use the parent so that we include siblings */
|
||||||
if (parent) drawable = X11DRV_get_client_window( parent );
|
if (parent) drawable = X11DRV_get_client_window( parent );
|
||||||
else drawable = root_window;
|
else drawable = root_window;
|
||||||
@ -478,23 +480,28 @@ BOOL X11DRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
|
|||||||
drawable = data->icon_window ? data->icon_window : data->whole_window;
|
drawable = data->icon_window ? data->icon_window : data->whole_window;
|
||||||
org.x = 0;
|
org.x = 0;
|
||||||
org.y = 0;
|
org.y = 0;
|
||||||
|
drawable_org = org;
|
||||||
}
|
}
|
||||||
else if (flags & DCX_WINDOW)
|
else if (flags & DCX_WINDOW)
|
||||||
{
|
{
|
||||||
drawable = data->whole_window;
|
drawable = data->whole_window;
|
||||||
org.x = win->rectWindow.left - data->whole_rect.left;
|
org.x = win->rectWindow.left - data->whole_rect.left;
|
||||||
org.y = win->rectWindow.top - data->whole_rect.top;
|
org.y = win->rectWindow.top - data->whole_rect.top;
|
||||||
|
drawable_org.x = data->whole_rect.left - win->rectClient.left;
|
||||||
|
drawable_org.y = data->whole_rect.top - win->rectClient.top;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
drawable = data->client_window;
|
drawable = data->client_window;
|
||||||
org.x = 0;
|
org.x = 0;
|
||||||
org.y = 0;
|
org.y = 0;
|
||||||
|
drawable_org = org;
|
||||||
if (flags & DCX_CLIPCHILDREN) mode = ClipByChildren; /* can use X11 clipping */
|
if (flags & DCX_CLIPCHILDREN) mode = ClipByChildren; /* can use X11 clipping */
|
||||||
}
|
}
|
||||||
|
MapWindowPoints( hwnd, 0, &drawable_org, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
X11DRV_SetDrawable( hdc, drawable, mode, org.x, org.y );
|
X11DRV_SetDrawable( hdc, drawable, mode, &org, &drawable_org );
|
||||||
|
|
||||||
if (flags & (DCX_EXCLUDERGN | DCX_INTERSECTRGN) ||
|
if (flags & (DCX_EXCLUDERGN | DCX_INTERSECTRGN) ||
|
||||||
SetHookFlags16( hdc, DCHF_VALIDATEVISRGN )) /* DC was dirty */
|
SetHookFlags16( hdc, DCHF_VALIDATEVISRGN )) /* DC was dirty */
|
||||||
@ -509,9 +516,6 @@ BOOL X11DRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
|
|||||||
if (flags & (DCX_EXCLUDERGN | DCX_INTERSECTRGN))
|
if (flags & (DCX_EXCLUDERGN | DCX_INTERSECTRGN))
|
||||||
CombineRgn( visRgn, visRgn, hrgn,
|
CombineRgn( visRgn, visRgn, hrgn,
|
||||||
(flags & DCX_INTERSECTRGN) ? RGN_AND : RGN_DIFF );
|
(flags & DCX_INTERSECTRGN) ? RGN_AND : RGN_DIFF );
|
||||||
|
|
||||||
/* make it relative to the drawable origin */
|
|
||||||
OffsetRgn( visRgn, org.x, org.y );
|
|
||||||
}
|
}
|
||||||
else visRgn = CreateRectRgn( 0, 0, 0, 0 );
|
else visRgn = CreateRectRgn( 0, 0, 0, 0 );
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ init X11DRV_Init
|
|||||||
@ cdecl ChoosePixelFormat(ptr ptr) X11DRV_ChoosePixelFormat
|
@ cdecl ChoosePixelFormat(ptr ptr) X11DRV_ChoosePixelFormat
|
||||||
@ cdecl Chord(ptr long long long long long long long long) X11DRV_Chord
|
@ cdecl Chord(ptr long long long long long long long long) X11DRV_Chord
|
||||||
@ cdecl CreateBitmap(ptr long) X11DRV_CreateBitmap
|
@ cdecl CreateBitmap(ptr long) X11DRV_CreateBitmap
|
||||||
@ cdecl CreateDC(ptr str str str ptr) X11DRV_CreateDC
|
@ cdecl CreateDC(ptr ptr str str str ptr) X11DRV_CreateDC
|
||||||
@ cdecl CreateDIBSection(ptr ptr long ptr long long long) X11DRV_DIB_CreateDIBSection
|
@ cdecl CreateDIBSection(ptr ptr long ptr long long long) X11DRV_DIB_CreateDIBSection
|
||||||
@ cdecl DeleteBitmap(long) X11DRV_DeleteBitmap
|
@ cdecl DeleteBitmap(long) X11DRV_DeleteBitmap
|
||||||
@ cdecl DeleteDC(ptr) X11DRV_DeleteDC
|
@ cdecl DeleteDC(ptr) X11DRV_DeleteDC
|
||||||
@ -49,6 +49,7 @@ init X11DRV_Init
|
|||||||
@ cdecl SelectPen(ptr long) X11DRV_SelectPen
|
@ cdecl SelectPen(ptr long) X11DRV_SelectPen
|
||||||
@ cdecl SetBitmapBits(long ptr long) X11DRV_SetBitmapBits
|
@ cdecl SetBitmapBits(long ptr long) X11DRV_SetBitmapBits
|
||||||
@ cdecl SetBkColor(ptr long) X11DRV_SetBkColor
|
@ cdecl SetBkColor(ptr long) X11DRV_SetBkColor
|
||||||
|
@ cdecl SetDCOrg(ptr long long) X11DRV_SetDCOrg
|
||||||
@ cdecl SetDIBColorTable(ptr long long ptr) X11DRV_SetDIBColorTable
|
@ cdecl SetDIBColorTable(ptr long long ptr) X11DRV_SetDIBColorTable
|
||||||
@ cdecl SetDIBits(ptr long long long ptr ptr long) X11DRV_SetDIBits
|
@ cdecl SetDIBits(ptr long long long ptr ptr long) X11DRV_SetDIBits
|
||||||
@ cdecl SetDIBitsToDevice(ptr long long long long long long long long ptr ptr long) X11DRV_SetDIBitsToDevice
|
@ cdecl SetDIBitsToDevice(ptr long long long long long long long long ptr ptr long) X11DRV_SetDIBitsToDevice
|
||||||
|
@ -637,7 +637,7 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
|
|||||||
if(flags & ETO_OPAQUE) {
|
if(flags & ETO_OPAQUE) {
|
||||||
TSXSetForeground( gdi_display, physDev->gc, physDev->backgroundPixel );
|
TSXSetForeground( gdi_display, physDev->gc, physDev->backgroundPixel );
|
||||||
TSXFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
TSXFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + rc.left, dc->DCOrgY + rc.top,
|
physDev->org.x + rc.left, physDev->org.y + rc.top,
|
||||||
rc.right - rc.left, rc.bottom - rc.top );
|
rc.right - rc.left, rc.bottom - rc.top );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -735,7 +735,8 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
|
|||||||
{
|
{
|
||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
pXRenderSetPictureClipRectangles( gdi_display, physDev->xrender->pict,
|
pXRenderSetPictureClipRectangles( gdi_display, physDev->xrender->pict,
|
||||||
0, 0, (XRectangle *)data->Buffer, data->rdh.nCount );
|
physDev->org.x, physDev->org.y,
|
||||||
|
(XRectangle *)data->Buffer, data->rdh.nCount );
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
HeapFree( GetProcessHeap(), 0, data );
|
HeapFree( GetProcessHeap(), 0, data );
|
||||||
}
|
}
|
||||||
@ -746,7 +747,7 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
|
|||||||
y - tm.tmAscent < rc.top || y + tm.tmDescent >= rc.bottom) {
|
y - tm.tmAscent < rc.top || y + tm.tmDescent >= rc.bottom) {
|
||||||
TSXSetForeground( gdi_display, physDev->gc, physDev->backgroundPixel );
|
TSXSetForeground( gdi_display, physDev->gc, physDev->backgroundPixel );
|
||||||
TSXFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
TSXFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + x, dc->DCOrgY + y - tm.tmAscent,
|
physDev->org.x + x, physDev->org.y + y - tm.tmAscent,
|
||||||
width, tm.tmAscent + tm.tmDescent );
|
width, tm.tmAscent + tm.tmDescent );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -809,8 +810,8 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TRACE("Writing %s at %d,%d\n", debugstr_wn(wstr,count), dc->DCOrgX + x,
|
TRACE("Writing %s at %ld,%ld\n", debugstr_wn(wstr,count),
|
||||||
dc->DCOrgY + y);
|
physDev->org.x + x, physDev->org.y + y);
|
||||||
|
|
||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
if(!lpDx)
|
if(!lpDx)
|
||||||
@ -819,7 +820,7 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
|
|||||||
physDev->xrender->pict,
|
physDev->xrender->pict,
|
||||||
physDev->xrender->cacheEntry->font_format,
|
physDev->xrender->cacheEntry->font_format,
|
||||||
physDev->xrender->cacheEntry->glyphset,
|
physDev->xrender->cacheEntry->glyphset,
|
||||||
0, 0, dc->DCOrgX + x, dc->DCOrgY + y,
|
0, 0, physDev->org.x + x, physDev->org.y + y,
|
||||||
glyphs, count);
|
glyphs, count);
|
||||||
|
|
||||||
else {
|
else {
|
||||||
@ -830,8 +831,8 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
|
|||||||
physDev->xrender->pict,
|
physDev->xrender->pict,
|
||||||
physDev->xrender->cacheEntry->font_format,
|
physDev->xrender->cacheEntry->font_format,
|
||||||
physDev->xrender->cacheEntry->glyphset,
|
physDev->xrender->cacheEntry->glyphset,
|
||||||
0, 0, dc->DCOrgX + x + xoff,
|
0, 0, physDev->org.x + x + xoff,
|
||||||
dc->DCOrgY + y + yoff,
|
physDev->org.y + y + yoff,
|
||||||
glyphs + idx, 1);
|
glyphs + idx, 1);
|
||||||
offset += INTERNAL_XWSTODS(dc, lpDx[idx]);
|
offset += INTERNAL_XWSTODS(dc, lpDx[idx]);
|
||||||
xoff = offset * cosEsc;
|
xoff = offset * cosEsc;
|
||||||
|
@ -888,7 +888,8 @@ static int BITBLT_GetSrcAreaStretch( X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE
|
|||||||
|
|
||||||
/* FIXME: avoid BadMatch errors */
|
/* FIXME: avoid BadMatch errors */
|
||||||
imageSrc = XGetImage( gdi_display, physDevSrc->drawable,
|
imageSrc = XGetImage( gdi_display, physDevSrc->drawable,
|
||||||
visRectSrc->left, visRectSrc->top,
|
physDevSrc->org.x + visRectSrc->left,
|
||||||
|
physDevSrc->org.y + visRectSrc->top,
|
||||||
visRectSrc->right - visRectSrc->left,
|
visRectSrc->right - visRectSrc->left,
|
||||||
visRectSrc->bottom - visRectSrc->top,
|
visRectSrc->bottom - visRectSrc->top,
|
||||||
AllPlanes, ZPixmap );
|
AllPlanes, ZPixmap );
|
||||||
@ -939,25 +940,30 @@ static int BITBLT_GetSrcArea( X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDe
|
|||||||
XSetBackground( gdi_display, gc, physDevDst->textPixel );
|
XSetBackground( gdi_display, gc, physDevDst->textPixel );
|
||||||
XSetForeground( gdi_display, gc, physDevDst->backgroundPixel );
|
XSetForeground( gdi_display, gc, physDevDst->backgroundPixel );
|
||||||
XCopyPlane( gdi_display, physDevSrc->drawable, pixmap, gc,
|
XCopyPlane( gdi_display, physDevSrc->drawable, pixmap, gc,
|
||||||
visRectSrc->left, visRectSrc->top,
|
physDevSrc->org.x + visRectSrc->left,
|
||||||
|
physDevSrc->org.y + visRectSrc->top,
|
||||||
width, height, 0, 0, 1);
|
width, height, 0, 0, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
XCopyArea( gdi_display, physDevSrc->drawable, pixmap, gc,
|
XCopyArea( gdi_display, physDevSrc->drawable, pixmap, gc,
|
||||||
visRectSrc->left, visRectSrc->top, width, height, 0, 0);
|
physDevSrc->org.x + visRectSrc->left,
|
||||||
|
physDevSrc->org.y + visRectSrc->top,
|
||||||
|
width, height, 0, 0);
|
||||||
exposures++;
|
exposures++;
|
||||||
}
|
}
|
||||||
else /* color -> color */
|
else /* color -> color */
|
||||||
{
|
{
|
||||||
if (dcSrc->flags & DC_MEMORY)
|
if (dcSrc->flags & DC_MEMORY)
|
||||||
imageSrc = XGetImage( gdi_display, physDevSrc->drawable,
|
imageSrc = XGetImage( gdi_display, physDevSrc->drawable,
|
||||||
visRectSrc->left, visRectSrc->top,
|
physDevSrc->org.x + visRectSrc->left,
|
||||||
|
physDevSrc->org.y + visRectSrc->top,
|
||||||
width, height, AllPlanes, ZPixmap );
|
width, height, AllPlanes, ZPixmap );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Make sure we don't get a BadMatch error */
|
/* Make sure we don't get a BadMatch error */
|
||||||
XCopyArea( gdi_display, physDevSrc->drawable, pixmap, gc,
|
XCopyArea( gdi_display, physDevSrc->drawable, pixmap, gc,
|
||||||
visRectSrc->left, visRectSrc->top,
|
physDevSrc->org.x + visRectSrc->left,
|
||||||
|
physDevSrc->org.y + visRectSrc->top,
|
||||||
width, height, 0, 0);
|
width, height, 0, 0);
|
||||||
exposures++;
|
exposures++;
|
||||||
imageSrc = XGetImage( gdi_display, pixmap, 0, 0, width, height,
|
imageSrc = XGetImage( gdi_display, pixmap, 0, 0, width, height,
|
||||||
@ -989,7 +995,8 @@ static int BITBLT_GetSrcArea( X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDe
|
|||||||
XSetForeground( gdi_display, gc, physDevDst->backgroundPixel );
|
XSetForeground( gdi_display, gc, physDevDst->backgroundPixel );
|
||||||
}
|
}
|
||||||
XCopyPlane( gdi_display, physDevSrc->drawable, pixmap, gc,
|
XCopyPlane( gdi_display, physDevSrc->drawable, pixmap, gc,
|
||||||
visRectSrc->left, visRectSrc->top,
|
physDevSrc->org.x + visRectSrc->left,
|
||||||
|
physDevSrc->org.y + visRectSrc->top,
|
||||||
width, height, 0, 0, 1 );
|
width, height, 0, 0, 1 );
|
||||||
exposures++;
|
exposures++;
|
||||||
}
|
}
|
||||||
@ -997,7 +1004,8 @@ static int BITBLT_GetSrcArea( X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDe
|
|||||||
{
|
{
|
||||||
/* FIXME: avoid BadMatch error */
|
/* FIXME: avoid BadMatch error */
|
||||||
imageSrc = XGetImage( gdi_display, physDevSrc->drawable,
|
imageSrc = XGetImage( gdi_display, physDevSrc->drawable,
|
||||||
visRectSrc->left, visRectSrc->top,
|
physDevSrc->org.x + visRectSrc->left,
|
||||||
|
physDevSrc->org.y + visRectSrc->top,
|
||||||
width, height, AllPlanes, ZPixmap );
|
width, height, AllPlanes, ZPixmap );
|
||||||
imageDst = X11DRV_DIB_CreateXImage( width, height, dcDst->bitsPerPixel );
|
imageDst = X11DRV_DIB_CreateXImage( width, height, dcDst->bitsPerPixel );
|
||||||
for (y = 0; y < height; y++)
|
for (y = 0; y < height; y++)
|
||||||
@ -1030,7 +1038,8 @@ static int BITBLT_GetDstArea(X11DRV_PDEVICE *physDev, Pixmap pixmap, GC gc, RECT
|
|||||||
(X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL) )
|
(X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL) )
|
||||||
{
|
{
|
||||||
XCopyArea( gdi_display, physDev->drawable, pixmap, gc,
|
XCopyArea( gdi_display, physDev->drawable, pixmap, gc,
|
||||||
visRectDst->left, visRectDst->top, width, height, 0, 0 );
|
physDev->org.x + visRectDst->left, physDev->org.y + visRectDst->top,
|
||||||
|
width, height, 0, 0 );
|
||||||
exposures++;
|
exposures++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1040,13 +1049,16 @@ static int BITBLT_GetDstArea(X11DRV_PDEVICE *physDev, Pixmap pixmap, GC gc, RECT
|
|||||||
|
|
||||||
if (physDev->dc->flags & DC_MEMORY)
|
if (physDev->dc->flags & DC_MEMORY)
|
||||||
image = XGetImage( gdi_display, physDev->drawable,
|
image = XGetImage( gdi_display, physDev->drawable,
|
||||||
visRectDst->left, visRectDst->top,
|
physDev->org.x + visRectDst->left,
|
||||||
|
physDev->org.y + visRectDst->top,
|
||||||
width, height, AllPlanes, ZPixmap );
|
width, height, AllPlanes, ZPixmap );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Make sure we don't get a BadMatch error */
|
/* Make sure we don't get a BadMatch error */
|
||||||
XCopyArea( gdi_display, physDev->drawable, pixmap, gc,
|
XCopyArea( gdi_display, physDev->drawable, pixmap, gc,
|
||||||
visRectDst->left, visRectDst->top, width, height, 0, 0);
|
physDev->org.x + visRectDst->left,
|
||||||
|
physDev->org.y + visRectDst->top,
|
||||||
|
width, height, 0, 0);
|
||||||
exposures++;
|
exposures++;
|
||||||
image = XGetImage( gdi_display, pixmap, 0, 0, width, height,
|
image = XGetImage( gdi_display, pixmap, 0, 0, width, height,
|
||||||
AllPlanes, ZPixmap );
|
AllPlanes, ZPixmap );
|
||||||
@ -1079,8 +1091,9 @@ static int BITBLT_PutDstArea(X11DRV_PDEVICE *physDev, Pixmap pixmap, RECT *visRe
|
|||||||
if (!X11DRV_PALETTE_PaletteToXPixel || (physDev->dc->bitsPerPixel == 1) ||
|
if (!X11DRV_PALETTE_PaletteToXPixel || (physDev->dc->bitsPerPixel == 1) ||
|
||||||
(X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL) )
|
(X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL) )
|
||||||
{
|
{
|
||||||
XCopyArea( gdi_display, pixmap, physDev->drawable, physDev->gc, 0, 0,
|
XCopyArea( gdi_display, pixmap, physDev->drawable, physDev->gc, 0, 0, width, height,
|
||||||
width, height, visRectDst->left, visRectDst->top );
|
physDev->org.x + visRectDst->left,
|
||||||
|
physDev->org.y + visRectDst->top );
|
||||||
exposures++;
|
exposures++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1095,7 +1108,8 @@ static int BITBLT_PutDstArea(X11DRV_PDEVICE *physDev, Pixmap pixmap, RECT *visRe
|
|||||||
X11DRV_PALETTE_PaletteToXPixel[XGetPixel( image, x, y )]);
|
X11DRV_PALETTE_PaletteToXPixel[XGetPixel( image, x, y )]);
|
||||||
}
|
}
|
||||||
XPutImage( gdi_display, physDev->drawable, physDev->gc, image, 0, 0,
|
XPutImage( gdi_display, physDev->drawable, physDev->gc, image, 0, 0,
|
||||||
visRectDst->left, visRectDst->top, width, height );
|
physDev->org.x + visRectDst->left,
|
||||||
|
physDev->org.y + visRectDst->top, width, height );
|
||||||
XDestroyImage( image );
|
XDestroyImage( image );
|
||||||
}
|
}
|
||||||
return exposures;
|
return exposures;
|
||||||
@ -1230,8 +1244,8 @@ static BOOL BITBLT_InternalStretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT
|
|||||||
|
|
||||||
/* Map the coordinates to device coords */
|
/* Map the coordinates to device coords */
|
||||||
|
|
||||||
xDst = dcDst->DCOrgX + XLPTODP( dcDst, xDst );
|
xDst = XLPTODP( dcDst, xDst );
|
||||||
yDst = dcDst->DCOrgY + YLPTODP( dcDst, yDst );
|
yDst = YLPTODP( dcDst, yDst );
|
||||||
|
|
||||||
/* Here we have to round to integers, not truncate */
|
/* Here we have to round to integers, not truncate */
|
||||||
widthDst = MulDiv(widthDst, dcDst->vportExtX, dcDst->wndExtX);
|
widthDst = MulDiv(widthDst, dcDst->vportExtX, dcDst->wndExtX);
|
||||||
@ -1242,14 +1256,14 @@ static BOOL BITBLT_InternalStretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT
|
|||||||
dcDst->vportExtX, dcDst->vportExtY,
|
dcDst->vportExtX, dcDst->vportExtY,
|
||||||
dcDst->wndOrgX, dcDst->wndOrgY,
|
dcDst->wndOrgX, dcDst->wndOrgY,
|
||||||
dcDst->wndExtX, dcDst->wndExtY );
|
dcDst->wndExtX, dcDst->wndExtY );
|
||||||
TRACE(" rectdst=%d,%d-%d,%d orgdst=%d,%d\n",
|
TRACE(" rectdst=%d,%d-%d,%d orgdst=%ld,%ld\n",
|
||||||
xDst, yDst, widthDst, heightDst,
|
xDst, yDst, widthDst, heightDst,
|
||||||
dcDst->DCOrgX, dcDst->DCOrgY );
|
physDevDst->org.x, physDevDst->org.y );
|
||||||
|
|
||||||
if (useSrc)
|
if (useSrc)
|
||||||
{
|
{
|
||||||
xSrc = dcSrc->DCOrgX + XLPTODP( dcSrc, xSrc );
|
xSrc = XLPTODP( dcSrc, xSrc );
|
||||||
ySrc = dcSrc->DCOrgY + YLPTODP( dcSrc, ySrc );
|
ySrc = YLPTODP( dcSrc, ySrc );
|
||||||
widthSrc = widthSrc * dcSrc->vportExtX / dcSrc->wndExtX;
|
widthSrc = widthSrc * dcSrc->vportExtX / dcSrc->wndExtX;
|
||||||
heightSrc = heightSrc * dcSrc->vportExtY / dcSrc->wndExtY;
|
heightSrc = heightSrc * dcSrc->vportExtY / dcSrc->wndExtY;
|
||||||
fStretch = (widthSrc != widthDst) || (heightSrc != heightDst);
|
fStretch = (widthSrc != widthDst) || (heightSrc != heightDst);
|
||||||
@ -1258,9 +1272,9 @@ static BOOL BITBLT_InternalStretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT
|
|||||||
dcSrc->vportExtX, dcSrc->vportExtY,
|
dcSrc->vportExtX, dcSrc->vportExtY,
|
||||||
dcSrc->wndOrgX, dcSrc->wndOrgY,
|
dcSrc->wndOrgX, dcSrc->wndOrgY,
|
||||||
dcSrc->wndExtX, dcSrc->wndExtY );
|
dcSrc->wndExtX, dcSrc->wndExtY );
|
||||||
TRACE(" rectsrc=%d,%d-%d,%d orgsrc=%d,%d\n",
|
TRACE(" rectsrc=%d,%d-%d,%d orgsrc=%ld,%ld\n",
|
||||||
xSrc, ySrc, widthSrc, heightSrc,
|
xSrc, ySrc, widthSrc, heightSrc,
|
||||||
dcSrc->DCOrgX, dcSrc->DCOrgY );
|
physDevSrc->org.x, physDevSrc->org.y );
|
||||||
if (!BITBLT_GetVisRectangles( dcDst, xDst, yDst, widthDst, heightDst,
|
if (!BITBLT_GetVisRectangles( dcDst, xDst, yDst, widthDst, heightDst,
|
||||||
dcSrc, xSrc, ySrc, widthSrc, heightSrc,
|
dcSrc, xSrc, ySrc, widthSrc, heightSrc,
|
||||||
&visRectSrc, &visRectDst ))
|
&visRectSrc, &visRectDst ))
|
||||||
@ -1298,7 +1312,9 @@ static BOOL BITBLT_InternalStretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT
|
|||||||
XSetFillStyle( gdi_display, physDevDst->gc, FillSolid );
|
XSetFillStyle( gdi_display, physDevDst->gc, FillSolid );
|
||||||
}
|
}
|
||||||
XFillRectangle( gdi_display, physDevDst->drawable, physDevDst->gc,
|
XFillRectangle( gdi_display, physDevDst->drawable, physDevDst->gc,
|
||||||
visRectDst.left, visRectDst.top, width, height );
|
physDevDst->org.x + visRectDst.left,
|
||||||
|
physDevDst->org.y + visRectDst.top,
|
||||||
|
width, height );
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
@ -1323,7 +1339,9 @@ static BOOL BITBLT_InternalStretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT
|
|||||||
XSetFillStyle( gdi_display, physDevDst->gc, FillSolid );
|
XSetFillStyle( gdi_display, physDevDst->gc, FillSolid );
|
||||||
}
|
}
|
||||||
XFillRectangle( gdi_display, physDevDst->drawable, physDevDst->gc,
|
XFillRectangle( gdi_display, physDevDst->drawable, physDevDst->gc,
|
||||||
visRectDst.left, visRectDst.top, width, height );
|
physDevDst->org.x + visRectDst.left,
|
||||||
|
physDevDst->org.y + visRectDst.top,
|
||||||
|
width, height );
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -1336,7 +1354,9 @@ static BOOL BITBLT_InternalStretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT
|
|||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
XSetFunction( gdi_display, physDevDst->gc, GXxor );
|
XSetFunction( gdi_display, physDevDst->gc, GXxor );
|
||||||
XFillRectangle( gdi_display, physDevDst->drawable, physDevDst->gc,
|
XFillRectangle( gdi_display, physDevDst->drawable, physDevDst->gc,
|
||||||
visRectDst.left, visRectDst.top, width, height );
|
physDevDst->org.x + visRectDst.left,
|
||||||
|
physDevDst->org.y + visRectDst.top,
|
||||||
|
width, height );
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1348,7 +1368,9 @@ static BOOL BITBLT_InternalStretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT
|
|||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
XSetFunction( gdi_display, physDevDst->gc, GXequiv );
|
XSetFunction( gdi_display, physDevDst->gc, GXequiv );
|
||||||
XFillRectangle( gdi_display, physDevDst->drawable, physDevDst->gc,
|
XFillRectangle( gdi_display, physDevDst->drawable, physDevDst->gc,
|
||||||
visRectDst.left, visRectDst.top, width, height );
|
physDevDst->org.x + visRectDst.left,
|
||||||
|
physDevDst->org.y + visRectDst.top,
|
||||||
|
width, height );
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1360,8 +1382,11 @@ static BOOL BITBLT_InternalStretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT
|
|||||||
XSetFunction( gdi_display, physDevDst->gc, GXcopy );
|
XSetFunction( gdi_display, physDevDst->gc, GXcopy );
|
||||||
XCopyArea( gdi_display, physDevSrc->drawable,
|
XCopyArea( gdi_display, physDevSrc->drawable,
|
||||||
physDevDst->drawable, physDevDst->gc,
|
physDevDst->drawable, physDevDst->gc,
|
||||||
visRectSrc.left, visRectSrc.top,
|
physDevSrc->org.x + visRectSrc.left,
|
||||||
width, height, visRectDst.left, visRectDst.top );
|
physDevSrc->org.y + visRectSrc.top,
|
||||||
|
width, height,
|
||||||
|
physDevDst->org.x + visRectDst.left,
|
||||||
|
physDevDst->org.y + visRectDst.top );
|
||||||
physDevDst->exposures++;
|
physDevDst->exposures++;
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1374,8 +1399,11 @@ static BOOL BITBLT_InternalStretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT
|
|||||||
XSetFunction( gdi_display, physDevDst->gc, GXcopy );
|
XSetFunction( gdi_display, physDevDst->gc, GXcopy );
|
||||||
XCopyPlane( gdi_display, physDevSrc->drawable,
|
XCopyPlane( gdi_display, physDevSrc->drawable,
|
||||||
physDevDst->drawable, physDevDst->gc,
|
physDevDst->drawable, physDevDst->gc,
|
||||||
visRectSrc.left, visRectSrc.top,
|
physDevSrc->org.x + visRectSrc.left,
|
||||||
width, height, visRectDst.left, visRectDst.top, 1 );
|
physDevSrc->org.y + visRectSrc.top,
|
||||||
|
width, height,
|
||||||
|
physDevDst->org.x + visRectDst.left,
|
||||||
|
physDevDst->org.y + visRectDst.top, 1 );
|
||||||
physDevDst->exposures++;
|
physDevDst->exposures++;
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1387,7 +1415,9 @@ static BOOL BITBLT_InternalStretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT
|
|||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
XSetFunction( gdi_display, physDevDst->gc, GXcopy );
|
XSetFunction( gdi_display, physDevDst->gc, GXcopy );
|
||||||
XFillRectangle( gdi_display, physDevDst->drawable, physDevDst->gc,
|
XFillRectangle( gdi_display, physDevDst->drawable, physDevDst->gc,
|
||||||
visRectDst.left, visRectDst.top, width, height );
|
physDevDst->org.x + visRectDst.left,
|
||||||
|
physDevDst->org.y + visRectDst.top,
|
||||||
|
width, height );
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
@ -1403,7 +1433,9 @@ static BOOL BITBLT_InternalStretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT
|
|||||||
XSetFillStyle( gdi_display, physDevDst->gc, FillSolid );
|
XSetFillStyle( gdi_display, physDevDst->gc, FillSolid );
|
||||||
}
|
}
|
||||||
XFillRectangle( gdi_display, physDevDst->drawable, physDevDst->gc,
|
XFillRectangle( gdi_display, physDevDst->drawable, physDevDst->gc,
|
||||||
visRectDst.left, visRectDst.top, width, height );
|
physDevDst->org.x + visRectDst.left,
|
||||||
|
physDevDst->org.y + visRectDst.top,
|
||||||
|
width, height );
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -1522,10 +1554,10 @@ BOOL X11DRV_BitBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst,
|
|||||||
(dcSrc->bitsPerPixel == dcDst->bitsPerPixel))
|
(dcSrc->bitsPerPixel == dcDst->bitsPerPixel))
|
||||||
{
|
{
|
||||||
/* do everything ourselves; map coordinates */
|
/* do everything ourselves; map coordinates */
|
||||||
xSrc = dcSrc->DCOrgX + XLPTODP( dcSrc, xSrc );
|
xSrc = XLPTODP( dcSrc, xSrc );
|
||||||
ySrc = dcSrc->DCOrgY + YLPTODP( dcSrc, ySrc );
|
ySrc = YLPTODP( dcSrc, ySrc );
|
||||||
xDst = dcDst->DCOrgX + XLPTODP( dcDst, xDst );
|
xDst = XLPTODP( dcDst, xDst );
|
||||||
yDst = dcDst->DCOrgY + YLPTODP( dcDst, yDst );
|
yDst = YLPTODP( dcDst, yDst );
|
||||||
width = MulDiv(width, dcDst->vportExtX, dcDst->wndExtX);
|
width = MulDiv(width, dcDst->vportExtX, dcDst->wndExtX);
|
||||||
height = MulDiv(height, dcDst->vportExtY, dcDst->wndExtY);
|
height = MulDiv(height, dcDst->vportExtY, dcDst->wndExtY);
|
||||||
|
|
||||||
@ -1586,4 +1618,3 @@ BOOL X11DRV_StretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst,
|
|||||||
X11DRV_UnlockDIBSection( physDevDst, TRUE );
|
X11DRV_UnlockDIBSection( physDevDst, TRUE );
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ void X11DRV_SetDeviceClipping( X11DRV_PDEVICE *physDev, HRGN hrgn )
|
|||||||
RGNDATA *data;
|
RGNDATA *data;
|
||||||
|
|
||||||
if (!(data = X11DRV_GetRegionData( hrgn, 0 ))) return;
|
if (!(data = X11DRV_GetRegionData( hrgn, 0 ))) return;
|
||||||
TSXSetClipRectangles( gdi_display, physDev->gc, 0, 0,
|
TSXSetClipRectangles( gdi_display, physDev->gc, physDev->org.x, physDev->org.y,
|
||||||
(XRectangle *)data->Buffer, data->rdh.nCount, YXBanded );
|
(XRectangle *)data->Buffer, data->rdh.nCount, YXBanded );
|
||||||
HeapFree( GetProcessHeap(), 0, data );
|
HeapFree( GetProcessHeap(), 0, data );
|
||||||
}
|
}
|
||||||
@ -128,27 +128,17 @@ void X11DRV_SetDeviceClipping( X11DRV_PDEVICE *physDev, HRGN hrgn )
|
|||||||
*
|
*
|
||||||
* Set the drawable, clipping mode and origin for a DC.
|
* Set the drawable, clipping mode and origin for a DC.
|
||||||
*/
|
*/
|
||||||
void X11DRV_SetDrawable( HDC hdc, Drawable drawable, int mode, int org_x, int org_y )
|
void X11DRV_SetDrawable( HDC hdc, Drawable drawable, int mode, const POINT *org,
|
||||||
|
const POINT *drawable_org )
|
||||||
{
|
{
|
||||||
DC *dc = DC_GetDCPtr( hdc );
|
DC *dc = DC_GetDCPtr( hdc );
|
||||||
if (dc)
|
if (dc)
|
||||||
{
|
{
|
||||||
X11DRV_PDEVICE *physDev = (X11DRV_PDEVICE *)dc->physDev;
|
X11DRV_PDEVICE *physDev = (X11DRV_PDEVICE *)dc->physDev;
|
||||||
/*
|
|
||||||
* This function change the coordinate system (DCOrgX,DCOrgY)
|
physDev->org = *org;
|
||||||
* values. When it moves the origin, other data like the current clipping
|
|
||||||
* region will not be moved to that new origin. In the case of DCs that are class
|
|
||||||
* or window DCs that clipping region might be a valid value from a previous use
|
|
||||||
* of the DC and changing the origin of the DC without moving the clip region
|
|
||||||
* results in a clip region that is not placed properly in the DC.
|
|
||||||
* This code will save the dc origin, let the SetDrawable
|
|
||||||
* modify the origin and reset the clipping. When the clipping is set,
|
|
||||||
* it is moved according to the new DC origin.
|
|
||||||
*/
|
|
||||||
if (dc->hClipRgn) OffsetRgn( dc->hClipRgn, org_x - dc->DCOrgX, org_y - dc->DCOrgY );
|
|
||||||
dc->DCOrgX = org_x;
|
|
||||||
dc->DCOrgY = org_y;
|
|
||||||
physDev->drawable = drawable;
|
physDev->drawable = drawable;
|
||||||
|
physDev->drawable_org = *drawable_org;
|
||||||
TSXSetSubwindowMode( gdi_display, physDev->gc, mode );
|
TSXSetSubwindowMode( gdi_display, physDev->gc, mode );
|
||||||
if(physDev->xrender)
|
if(physDev->xrender)
|
||||||
X11DRV_XRender_UpdateDrawable( physDev );
|
X11DRV_XRender_UpdateDrawable( physDev );
|
||||||
@ -202,8 +192,8 @@ void X11DRV_EndGraphicsExposures( HDC hdc, HRGN hrgn )
|
|||||||
if (event.type == NoExpose) break;
|
if (event.type == NoExpose) break;
|
||||||
if (event.type == GraphicsExpose)
|
if (event.type == GraphicsExpose)
|
||||||
{
|
{
|
||||||
int x = event.xgraphicsexpose.x - dc->DCOrgX;
|
int x = event.xgraphicsexpose.x - physDev->org.x;
|
||||||
int y = event.xgraphicsexpose.y - dc->DCOrgY;
|
int y = event.xgraphicsexpose.y - physDev->org.y;
|
||||||
|
|
||||||
TRACE( "got %d,%d %dx%d count %d\n",
|
TRACE( "got %d,%d %dx%d count %d\n",
|
||||||
x, y, event.xgraphicsexpose.width, event.xgraphicsexpose.height,
|
x, y, event.xgraphicsexpose.width, event.xgraphicsexpose.height,
|
||||||
@ -228,4 +218,3 @@ void X11DRV_EndGraphicsExposures( HDC hdc, HRGN hrgn )
|
|||||||
GDI_ReleaseObj( hdc );
|
GDI_ReleaseObj( hdc );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4796,8 +4796,8 @@ INT X11DRV_SetDIBitsToDevice( X11DRV_PDEVICE *physDev, INT xDest, INT yDest, DWO
|
|||||||
descr.xSrc = xSrc;
|
descr.xSrc = xSrc;
|
||||||
descr.ySrc = tmpheight >= 0 ? lines-(ySrc-startscan)-cy+(oldcy-cy)
|
descr.ySrc = tmpheight >= 0 ? lines-(ySrc-startscan)-cy+(oldcy-cy)
|
||||||
: ySrc - startscan;
|
: ySrc - startscan;
|
||||||
descr.xDest = dc->DCOrgX + XLPTODP( dc, xDest );
|
descr.xDest = physDev->org.x + XLPTODP( dc, xDest );
|
||||||
descr.yDest = dc->DCOrgY + YLPTODP( dc, yDest ) +
|
descr.yDest = physDev->org.y + YLPTODP( dc, yDest ) +
|
||||||
(tmpheight >= 0 ? oldcy-cy : 0);
|
(tmpheight >= 0 ? oldcy-cy : 0);
|
||||||
descr.width = cx;
|
descr.width = cx;
|
||||||
descr.height = cy;
|
descr.height = cy;
|
||||||
@ -5178,7 +5178,8 @@ void X11DRV_DIB_CopyDIBSection(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physD
|
|||||||
}
|
}
|
||||||
/* perform the copy */
|
/* perform the copy */
|
||||||
X11DRV_DIB_DoCopyDIBSection(bmp, FALSE, colorMap, nColorMap,
|
X11DRV_DIB_DoCopyDIBSection(bmp, FALSE, colorMap, nColorMap,
|
||||||
physDevDst->drawable, xSrc, ySrc, xDest, yDest,
|
physDevDst->drawable, xSrc, ySrc,
|
||||||
|
physDevDst->org.x + xDest, physDevDst->org.y + yDest,
|
||||||
width, height);
|
width, height);
|
||||||
/* free color mapping */
|
/* free color mapping */
|
||||||
if (aColorMap)
|
if (aColorMap)
|
||||||
|
@ -85,7 +85,7 @@ BOOL X11DRV_SetupGCForPatBlt( X11DRV_PDEVICE *physDev, GC gc, BOOL fMapColors )
|
|||||||
XGCValues val;
|
XGCValues val;
|
||||||
unsigned long mask;
|
unsigned long mask;
|
||||||
Pixmap pixmap = 0;
|
Pixmap pixmap = 0;
|
||||||
DC *dc = physDev->dc;
|
POINT pt;
|
||||||
|
|
||||||
if (physDev->brush.style == BS_NULL) return FALSE;
|
if (physDev->brush.style == BS_NULL) return FALSE;
|
||||||
if (physDev->brush.pixel == -1)
|
if (physDev->brush.pixel == -1)
|
||||||
@ -108,7 +108,7 @@ BOOL X11DRV_SetupGCForPatBlt( X11DRV_PDEVICE *physDev, GC gc, BOOL fMapColors )
|
|||||||
val.background = X11DRV_PALETTE_XPixelToPalette[val.background];
|
val.background = X11DRV_PALETTE_XPixelToPalette[val.background];
|
||||||
}
|
}
|
||||||
|
|
||||||
val.function = X11DRV_XROPfunction[dc->ROPmode-1];
|
val.function = X11DRV_XROPfunction[GetROP2(physDev->hdc)-1];
|
||||||
/*
|
/*
|
||||||
** Let's replace GXinvert by GXxor with (black xor white)
|
** Let's replace GXinvert by GXxor with (black xor white)
|
||||||
** This solves the selection color and leak problems in excel
|
** This solves the selection color and leak problems in excel
|
||||||
@ -125,7 +125,7 @@ BOOL X11DRV_SetupGCForPatBlt( X11DRV_PDEVICE *physDev, GC gc, BOOL fMapColors )
|
|||||||
{
|
{
|
||||||
case FillStippled:
|
case FillStippled:
|
||||||
case FillOpaqueStippled:
|
case FillOpaqueStippled:
|
||||||
if (GetBkMode(dc->hSelf)==OPAQUE) val.fill_style = FillOpaqueStippled;
|
if (GetBkMode(physDev->hdc)==OPAQUE) val.fill_style = FillOpaqueStippled;
|
||||||
val.stipple = physDev->brush.pixmap;
|
val.stipple = physDev->brush.pixmap;
|
||||||
mask = GCStipple;
|
mask = GCStipple;
|
||||||
break;
|
break;
|
||||||
@ -156,14 +156,17 @@ BOOL X11DRV_SetupGCForPatBlt( X11DRV_PDEVICE *physDev, GC gc, BOOL fMapColors )
|
|||||||
mask = 0;
|
mask = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
val.ts_x_origin = dc->DCOrgX + dc->brushOrgX;
|
GetBrushOrgEx( physDev->hdc, &pt );
|
||||||
val.ts_y_origin = dc->DCOrgY + dc->brushOrgY;
|
val.ts_x_origin = physDev->org.x + pt.x;
|
||||||
|
val.ts_y_origin = physDev->org.y + pt.y;
|
||||||
val.fill_rule = (GetPolyFillMode(physDev->hdc) == WINDING) ? WindingRule : EvenOddRule;
|
val.fill_rule = (GetPolyFillMode(physDev->hdc) == WINDING) ? WindingRule : EvenOddRule;
|
||||||
TSXChangeGC( gdi_display, gc,
|
wine_tsx11_lock();
|
||||||
|
XChangeGC( gdi_display, gc,
|
||||||
GCFunction | GCForeground | GCBackground | GCFillStyle |
|
GCFunction | GCForeground | GCBackground | GCFillStyle |
|
||||||
GCFillRule | GCTileStipXOrigin | GCTileStipYOrigin | mask,
|
GCFillRule | GCTileStipXOrigin | GCTileStipYOrigin | mask,
|
||||||
&val );
|
&val );
|
||||||
if (pixmap) TSXFreePixmap( gdi_display, pixmap );
|
if (pixmap) XFreePixmap( gdi_display, pixmap );
|
||||||
|
wine_tsx11_unlock();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,11 +192,11 @@ BOOL X11DRV_SetupGCForBrush( X11DRV_PDEVICE *physDev )
|
|||||||
BOOL X11DRV_SetupGCForPen( X11DRV_PDEVICE *physDev )
|
BOOL X11DRV_SetupGCForPen( X11DRV_PDEVICE *physDev )
|
||||||
{
|
{
|
||||||
XGCValues val;
|
XGCValues val;
|
||||||
DC *dc = physDev->dc;
|
UINT rop2 = GetROP2(physDev->hdc);
|
||||||
|
|
||||||
if (physDev->pen.style == PS_NULL) return FALSE;
|
if (physDev->pen.style == PS_NULL) return FALSE;
|
||||||
|
|
||||||
switch (dc->ROPmode)
|
switch (rop2)
|
||||||
{
|
{
|
||||||
case R2_BLACK :
|
case R2_BLACK :
|
||||||
val.foreground = BlackPixel( gdi_display, DefaultScreen(gdi_display) );
|
val.foreground = BlackPixel( gdi_display, DefaultScreen(gdi_display) );
|
||||||
@ -214,7 +217,7 @@ BOOL X11DRV_SetupGCForPen( X11DRV_PDEVICE *physDev )
|
|||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
val.foreground = physDev->pen.pixel;
|
val.foreground = physDev->pen.pixel;
|
||||||
val.function = X11DRV_XROPfunction[dc->ROPmode-1];
|
val.function = X11DRV_XROPfunction[rop2-1];
|
||||||
}
|
}
|
||||||
val.background = physDev->backgroundPixel;
|
val.background = physDev->backgroundPixel;
|
||||||
val.fill_style = FillSolid;
|
val.fill_style = FillSolid;
|
||||||
@ -223,7 +226,7 @@ BOOL X11DRV_SetupGCForPen( X11DRV_PDEVICE *physDev )
|
|||||||
(physDev->pen.style != PS_INSIDEFRAME))
|
(physDev->pen.style != PS_INSIDEFRAME))
|
||||||
{
|
{
|
||||||
TSXSetDashes( gdi_display, physDev->gc, 0, physDev->pen.dashes, physDev->pen.dash_len );
|
TSXSetDashes( gdi_display, physDev->gc, 0, physDev->pen.dashes, physDev->pen.dash_len );
|
||||||
val.line_style = (GetBkMode(dc->hSelf) == OPAQUE) ? LineDoubleDash : LineOnOffDash;
|
val.line_style = (GetBkMode(physDev->hdc) == OPAQUE) ? LineDoubleDash : LineOnOffDash;
|
||||||
}
|
}
|
||||||
else val.line_style = LineSolid;
|
else val.line_style = LineSolid;
|
||||||
val.line_width = physDev->pen.width;
|
val.line_width = physDev->pen.width;
|
||||||
@ -297,26 +300,20 @@ BOOL X11DRV_SetupGCForText( X11DRV_PDEVICE *physDev )
|
|||||||
BOOL
|
BOOL
|
||||||
X11DRV_LineTo( X11DRV_PDEVICE *physDev, INT x, INT y )
|
X11DRV_LineTo( X11DRV_PDEVICE *physDev, INT x, INT y )
|
||||||
{
|
{
|
||||||
DC *dc = physDev->dc;
|
POINT pt[2];
|
||||||
POINT start;
|
|
||||||
POINT end;
|
|
||||||
|
|
||||||
if (X11DRV_SetupGCForPen( physDev )) {
|
if (X11DRV_SetupGCForPen( physDev )) {
|
||||||
/* Update the pixmap from the DIB section */
|
/* Update the pixmap from the DIB section */
|
||||||
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
|
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
|
||||||
|
|
||||||
start.x = dc->CursPosX;
|
GetCurrentPositionEx( physDev->hdc, &pt[0] );
|
||||||
start.y = dc->CursPosY;
|
pt[1].x = x;
|
||||||
end.x = x;
|
pt[1].y = y;
|
||||||
end.y = y;
|
LPtoDP( physDev->hdc, pt, 2 );
|
||||||
INTERNAL_LPTODP(dc,&start);
|
|
||||||
INTERNAL_LPTODP(dc,&end);
|
|
||||||
|
|
||||||
TSXDrawLine(gdi_display, physDev->drawable, physDev->gc,
|
TSXDrawLine(gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + start.x,
|
physDev->org.x + pt[0].x, physDev->org.y + pt[0].y,
|
||||||
dc->DCOrgY + start.y,
|
physDev->org.x + pt[1].x, physDev->org.y + pt[1].y );
|
||||||
dc->DCOrgX + end.x,
|
|
||||||
dc->DCOrgY + end.y);
|
|
||||||
|
|
||||||
/* Update the DIBSection from the pixmap */
|
/* Update the DIBSection from the pixmap */
|
||||||
X11DRV_UnlockDIBSection(physDev, TRUE);
|
X11DRV_UnlockDIBSection(physDev, TRUE);
|
||||||
@ -410,7 +407,7 @@ X11DRV_DrawArc( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
|
|||||||
if ((lines > 0) && X11DRV_SetupGCForBrush( physDev )) {
|
if ((lines > 0) && X11DRV_SetupGCForBrush( physDev )) {
|
||||||
TSXSetArcMode( gdi_display, physDev->gc, (lines==1) ? ArcChord : ArcPieSlice);
|
TSXSetArcMode( gdi_display, physDev->gc, (lines==1) ? ArcChord : ArcPieSlice);
|
||||||
TSXFillArc( gdi_display, physDev->drawable, physDev->gc,
|
TSXFillArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left, dc->DCOrgY + top,
|
physDev->org.x + left, physDev->org.y + top,
|
||||||
right-left-1, bottom-top-1, istart_angle, idiff_angle );
|
right-left-1, bottom-top-1, istart_angle, idiff_angle );
|
||||||
update = TRUE;
|
update = TRUE;
|
||||||
}
|
}
|
||||||
@ -419,20 +416,20 @@ X11DRV_DrawArc( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
|
|||||||
|
|
||||||
if (X11DRV_SetupGCForPen( physDev )){
|
if (X11DRV_SetupGCForPen( physDev )){
|
||||||
TSXDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
TSXDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left, dc->DCOrgY + top,
|
physDev->org.x + left, physDev->org.y + top,
|
||||||
right-left-1, bottom-top-1, istart_angle, idiff_angle );
|
right-left-1, bottom-top-1, istart_angle, idiff_angle );
|
||||||
if (lines) {
|
if (lines) {
|
||||||
/* use the truncated values */
|
/* use the truncated values */
|
||||||
start_angle=(double)istart_angle*PI/64./180.;
|
start_angle=(double)istart_angle*PI/64./180.;
|
||||||
end_angle=(double)(istart_angle+idiff_angle)*PI/64./180.;
|
end_angle=(double)(istart_angle+idiff_angle)*PI/64./180.;
|
||||||
/* calculate the endpoints and round correctly */
|
/* calculate the endpoints and round correctly */
|
||||||
points[0].x = (int) floor(dc->DCOrgX + (right+left)/2.0 +
|
points[0].x = (int) floor(physDev->org.x + (right+left)/2.0 +
|
||||||
cos(start_angle) * (right-left-width*2+2) / 2. + 0.5);
|
cos(start_angle) * (right-left-width*2+2) / 2. + 0.5);
|
||||||
points[0].y = (int) floor(dc->DCOrgY + (top+bottom)/2.0 -
|
points[0].y = (int) floor(physDev->org.y + (top+bottom)/2.0 -
|
||||||
sin(start_angle) * (bottom-top-width*2+2) / 2. + 0.5);
|
sin(start_angle) * (bottom-top-width*2+2) / 2. + 0.5);
|
||||||
points[1].x = (int) floor(dc->DCOrgX + (right+left)/2.0 +
|
points[1].x = (int) floor(physDev->org.x + (right+left)/2.0 +
|
||||||
cos(end_angle) * (right-left-width*2+2) / 2. + 0.5);
|
cos(end_angle) * (right-left-width*2+2) / 2. + 0.5);
|
||||||
points[1].y = (int) floor(dc->DCOrgY + (top+bottom)/2.0 -
|
points[1].y = (int) floor(physDev->org.y + (top+bottom)/2.0 -
|
||||||
sin(end_angle) * (bottom-top-width*2+2) / 2. + 0.5);
|
sin(end_angle) * (bottom-top-width*2+2) / 2. + 0.5);
|
||||||
|
|
||||||
/* OK, this stuff is optimized for Xfree86
|
/* OK, this stuff is optimized for Xfree86
|
||||||
@ -446,8 +443,8 @@ X11DRV_DrawArc( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
|
|||||||
if (lines == 2) {
|
if (lines == 2) {
|
||||||
INT dx1,dy1;
|
INT dx1,dy1;
|
||||||
points[3] = points[1];
|
points[3] = points[1];
|
||||||
points[1].x = dc->DCOrgX + xcenter;
|
points[1].x = physDev->org.x + xcenter;
|
||||||
points[1].y = dc->DCOrgY + ycenter;
|
points[1].y = physDev->org.y + ycenter;
|
||||||
points[2] = points[1];
|
points[2] = points[1];
|
||||||
dx1=points[1].x-points[0].x;
|
dx1=points[1].x-points[0].x;
|
||||||
dy1=points[1].y-points[0].y;
|
dy1=points[1].y-points[0].y;
|
||||||
@ -565,14 +562,14 @@ X11DRV_Ellipse( X11DRV_PDEVICE *physDev, INT left, INT top, INT right, INT botto
|
|||||||
if (X11DRV_SetupGCForBrush( physDev ))
|
if (X11DRV_SetupGCForBrush( physDev ))
|
||||||
{
|
{
|
||||||
TSXFillArc( gdi_display, physDev->drawable, physDev->gc,
|
TSXFillArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left, dc->DCOrgY + top,
|
physDev->org.x + left, physDev->org.y + top,
|
||||||
right-left-1, bottom-top-1, 0, 360*64 );
|
right-left-1, bottom-top-1, 0, 360*64 );
|
||||||
update = TRUE;
|
update = TRUE;
|
||||||
}
|
}
|
||||||
if (X11DRV_SetupGCForPen( physDev ))
|
if (X11DRV_SetupGCForPen( physDev ))
|
||||||
{
|
{
|
||||||
TSXDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
TSXDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left, dc->DCOrgY + top,
|
physDev->org.x + left, physDev->org.y + top,
|
||||||
right-left-1, bottom-top-1, 0, 360*64 );
|
right-left-1, bottom-top-1, 0, 360*64 );
|
||||||
update = TRUE;
|
update = TRUE;
|
||||||
}
|
}
|
||||||
@ -634,15 +631,15 @@ X11DRV_Rectangle(X11DRV_PDEVICE *physDev, INT left, INT top, INT right, INT bott
|
|||||||
if (X11DRV_SetupGCForBrush( physDev ))
|
if (X11DRV_SetupGCForBrush( physDev ))
|
||||||
{
|
{
|
||||||
TSXFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
TSXFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left + (width + 1) / 2,
|
physDev->org.x + left + (width + 1) / 2,
|
||||||
dc->DCOrgY + top + (width + 1) / 2,
|
physDev->org.y + top + (width + 1) / 2,
|
||||||
right-left-width-1, bottom-top-width-1);
|
right-left-width-1, bottom-top-width-1);
|
||||||
update = TRUE;
|
update = TRUE;
|
||||||
}
|
}
|
||||||
if (X11DRV_SetupGCForPen( physDev ))
|
if (X11DRV_SetupGCForPen( physDev ))
|
||||||
{
|
{
|
||||||
TSXDrawRectangle( gdi_display, physDev->drawable, physDev->gc,
|
TSXDrawRectangle( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left, dc->DCOrgY + top,
|
physDev->org.x + left, physDev->org.y + top,
|
||||||
right-left-1, bottom-top-1 );
|
right-left-1, bottom-top-1 );
|
||||||
update = TRUE;
|
update = TRUE;
|
||||||
}
|
}
|
||||||
@ -714,61 +711,61 @@ X11DRV_RoundRect( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
|
|||||||
if (ell_width > (right-left) )
|
if (ell_width > (right-left) )
|
||||||
if (ell_height > (bottom-top) )
|
if (ell_height > (bottom-top) )
|
||||||
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left, dc->DCOrgY + top,
|
physDev->org.x + left, physDev->org.y + top,
|
||||||
right - left - 1, bottom - top - 1,
|
right - left - 1, bottom - top - 1,
|
||||||
0, 360 * 64 );
|
0, 360 * 64 );
|
||||||
else{
|
else{
|
||||||
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left, dc->DCOrgY + top,
|
physDev->org.x + left, physDev->org.y + top,
|
||||||
right - left - 1, ell_height, 0, 180 * 64 );
|
right - left - 1, ell_height, 0, 180 * 64 );
|
||||||
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left,
|
physDev->org.x + left,
|
||||||
dc->DCOrgY + bottom - ell_height - 1,
|
physDev->org.y + bottom - ell_height - 1,
|
||||||
right - left - 1, ell_height, 180 * 64,
|
right - left - 1, ell_height, 180 * 64,
|
||||||
180 * 64 );
|
180 * 64 );
|
||||||
}
|
}
|
||||||
else if (ell_height > (bottom-top) ){
|
else if (ell_height > (bottom-top) ){
|
||||||
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left, dc->DCOrgY + top,
|
physDev->org.x + left, physDev->org.y + top,
|
||||||
ell_width, bottom - top - 1, 90 * 64, 180 * 64 );
|
ell_width, bottom - top - 1, 90 * 64, 180 * 64 );
|
||||||
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + right - ell_width -1, dc->DCOrgY + top,
|
physDev->org.x + right - ell_width -1, physDev->org.y + top,
|
||||||
ell_width, bottom - top - 1, 270 * 64, 180 * 64 );
|
ell_width, bottom - top - 1, 270 * 64, 180 * 64 );
|
||||||
}else{
|
}else{
|
||||||
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left, dc->DCOrgY + top,
|
physDev->org.x + left, physDev->org.y + top,
|
||||||
ell_width, ell_height, 90 * 64, 90 * 64 );
|
ell_width, ell_height, 90 * 64, 90 * 64 );
|
||||||
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left,
|
physDev->org.x + left,
|
||||||
dc->DCOrgY + bottom - ell_height - 1,
|
physDev->org.y + bottom - ell_height - 1,
|
||||||
ell_width, ell_height, 180 * 64, 90 * 64 );
|
ell_width, ell_height, 180 * 64, 90 * 64 );
|
||||||
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + right - ell_width - 1,
|
physDev->org.x + right - ell_width - 1,
|
||||||
dc->DCOrgY + bottom - ell_height - 1,
|
physDev->org.y + bottom - ell_height - 1,
|
||||||
ell_width, ell_height, 270 * 64, 90 * 64 );
|
ell_width, ell_height, 270 * 64, 90 * 64 );
|
||||||
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + right - ell_width - 1,
|
physDev->org.x + right - ell_width - 1,
|
||||||
dc->DCOrgY + top,
|
physDev->org.y + top,
|
||||||
ell_width, ell_height, 0, 90 * 64 );
|
ell_width, ell_height, 0, 90 * 64 );
|
||||||
}
|
}
|
||||||
if (ell_width < right - left)
|
if (ell_width < right - left)
|
||||||
{
|
{
|
||||||
XFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
XFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left + (ell_width + 1) / 2,
|
physDev->org.x + left + (ell_width + 1) / 2,
|
||||||
dc->DCOrgY + top + 1,
|
physDev->org.y + top + 1,
|
||||||
right - left - ell_width - 1,
|
right - left - ell_width - 1,
|
||||||
(ell_height + 1) / 2 - 1);
|
(ell_height + 1) / 2 - 1);
|
||||||
XFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
XFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left + (ell_width + 1) / 2,
|
physDev->org.x + left + (ell_width + 1) / 2,
|
||||||
dc->DCOrgY + bottom - (ell_height) / 2 - 1,
|
physDev->org.y + bottom - (ell_height) / 2 - 1,
|
||||||
right - left - ell_width - 1,
|
right - left - ell_width - 1,
|
||||||
(ell_height) / 2 );
|
(ell_height) / 2 );
|
||||||
}
|
}
|
||||||
if (ell_height < bottom - top)
|
if (ell_height < bottom - top)
|
||||||
{
|
{
|
||||||
XFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
XFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left + 1,
|
physDev->org.x + left + 1,
|
||||||
dc->DCOrgY + top + (ell_height + 1) / 2,
|
physDev->org.y + top + (ell_height + 1) / 2,
|
||||||
right - left - 2,
|
right - left - 2,
|
||||||
bottom - top - ell_height - 1);
|
bottom - top - ell_height - 1);
|
||||||
}
|
}
|
||||||
@ -788,65 +785,65 @@ X11DRV_RoundRect( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
|
|||||||
if (ell_width > (right-left) )
|
if (ell_width > (right-left) )
|
||||||
if (ell_height > (bottom-top) )
|
if (ell_height > (bottom-top) )
|
||||||
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left, dc->DCOrgY + top,
|
physDev->org.x + left, physDev->org.y + top,
|
||||||
right - left - 1, bottom -top - 1, 0 , 360 * 64 );
|
right - left - 1, bottom -top - 1, 0 , 360 * 64 );
|
||||||
else{
|
else{
|
||||||
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left, dc->DCOrgY + top,
|
physDev->org.x + left, physDev->org.y + top,
|
||||||
right - left - 1, ell_height - 1, 0 , 180 * 64 );
|
right - left - 1, ell_height - 1, 0 , 180 * 64 );
|
||||||
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left,
|
physDev->org.x + left,
|
||||||
dc->DCOrgY + bottom - ell_height,
|
physDev->org.y + bottom - ell_height,
|
||||||
right - left - 1, ell_height - 1, 180 * 64 , 180 * 64 );
|
right - left - 1, ell_height - 1, 180 * 64 , 180 * 64 );
|
||||||
}
|
}
|
||||||
else if (ell_height > (bottom-top) ){
|
else if (ell_height > (bottom-top) ){
|
||||||
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left, dc->DCOrgY + top,
|
physDev->org.x + left, physDev->org.y + top,
|
||||||
ell_width - 1 , bottom - top - 1, 90 * 64 , 180 * 64 );
|
ell_width - 1 , bottom - top - 1, 90 * 64 , 180 * 64 );
|
||||||
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + right - ell_width,
|
physDev->org.x + right - ell_width,
|
||||||
dc->DCOrgY + top,
|
physDev->org.y + top,
|
||||||
ell_width - 1 , bottom - top - 1, 270 * 64 , 180 * 64 );
|
ell_width - 1 , bottom - top - 1, 270 * 64 , 180 * 64 );
|
||||||
}else{
|
}else{
|
||||||
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left, dc->DCOrgY + top,
|
physDev->org.x + left, physDev->org.y + top,
|
||||||
ell_width - 1, ell_height - 1, 90 * 64, 90 * 64 );
|
ell_width - 1, ell_height - 1, 90 * 64, 90 * 64 );
|
||||||
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left, dc->DCOrgY + bottom - ell_height,
|
physDev->org.x + left, physDev->org.y + bottom - ell_height,
|
||||||
ell_width - 1, ell_height - 1, 180 * 64, 90 * 64 );
|
ell_width - 1, ell_height - 1, 180 * 64, 90 * 64 );
|
||||||
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + right - ell_width,
|
physDev->org.x + right - ell_width,
|
||||||
dc->DCOrgY + bottom - ell_height,
|
physDev->org.y + bottom - ell_height,
|
||||||
ell_width - 1, ell_height - 1, 270 * 64, 90 * 64 );
|
ell_width - 1, ell_height - 1, 270 * 64, 90 * 64 );
|
||||||
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + right - ell_width, dc->DCOrgY + top,
|
physDev->org.x + right - ell_width, physDev->org.y + top,
|
||||||
ell_width - 1, ell_height - 1, 0, 90 * 64 );
|
ell_width - 1, ell_height - 1, 0, 90 * 64 );
|
||||||
}
|
}
|
||||||
if (ell_width < right - left)
|
if (ell_width < right - left)
|
||||||
{
|
{
|
||||||
XDrawLine( gdi_display, physDev->drawable, physDev->gc,
|
XDrawLine( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left + ell_width / 2,
|
physDev->org.x + left + ell_width / 2,
|
||||||
dc->DCOrgY + top,
|
physDev->org.y + top,
|
||||||
dc->DCOrgX + right - (ell_width+1) / 2,
|
physDev->org.x + right - (ell_width+1) / 2,
|
||||||
dc->DCOrgY + top);
|
physDev->org.y + top);
|
||||||
XDrawLine( gdi_display, physDev->drawable, physDev->gc,
|
XDrawLine( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left + ell_width / 2 ,
|
physDev->org.x + left + ell_width / 2 ,
|
||||||
dc->DCOrgY + bottom - 1,
|
physDev->org.y + bottom - 1,
|
||||||
dc->DCOrgX + right - (ell_width+1)/ 2,
|
physDev->org.x + right - (ell_width+1)/ 2,
|
||||||
dc->DCOrgY + bottom - 1);
|
physDev->org.y + bottom - 1);
|
||||||
}
|
}
|
||||||
if (ell_height < bottom - top)
|
if (ell_height < bottom - top)
|
||||||
{
|
{
|
||||||
XDrawLine( gdi_display, physDev->drawable, physDev->gc,
|
XDrawLine( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + right - 1,
|
physDev->org.x + right - 1,
|
||||||
dc->DCOrgY + top + ell_height / 2,
|
physDev->org.y + top + ell_height / 2,
|
||||||
dc->DCOrgX + right - 1,
|
physDev->org.x + right - 1,
|
||||||
dc->DCOrgY + bottom - (ell_height+1) / 2);
|
physDev->org.y + bottom - (ell_height+1) / 2);
|
||||||
XDrawLine( gdi_display, physDev->drawable, physDev->gc,
|
XDrawLine( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + left,
|
physDev->org.x + left,
|
||||||
dc->DCOrgY + top + ell_height / 2,
|
physDev->org.y + top + ell_height / 2,
|
||||||
dc->DCOrgX + left,
|
physDev->org.x + left,
|
||||||
dc->DCOrgY + bottom - (ell_height+1) / 2);
|
physDev->org.y + bottom - (ell_height+1) / 2);
|
||||||
}
|
}
|
||||||
update = TRUE;
|
update = TRUE;
|
||||||
}
|
}
|
||||||
@ -867,10 +864,11 @@ COLORREF
|
|||||||
X11DRV_SetPixel( X11DRV_PDEVICE *physDev, INT x, INT y, COLORREF color )
|
X11DRV_SetPixel( X11DRV_PDEVICE *physDev, INT x, INT y, COLORREF color )
|
||||||
{
|
{
|
||||||
Pixel pixel;
|
Pixel pixel;
|
||||||
DC *dc = physDev->dc;
|
POINT pt;
|
||||||
|
|
||||||
x = dc->DCOrgX + INTERNAL_XWPTODP( dc, x, y );
|
pt.x = x;
|
||||||
y = dc->DCOrgY + INTERNAL_YWPTODP( dc, x, y );
|
pt.y = y;
|
||||||
|
LPtoDP( physDev->hdc, &pt, 1 );
|
||||||
pixel = X11DRV_PALETTE_ToPhysical( physDev, color );
|
pixel = X11DRV_PALETTE_ToPhysical( physDev, color );
|
||||||
|
|
||||||
/* Update the pixmap from the DIB section */
|
/* Update the pixmap from the DIB section */
|
||||||
@ -880,7 +878,8 @@ X11DRV_SetPixel( X11DRV_PDEVICE *physDev, INT x, INT y, COLORREF color )
|
|||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
XSetForeground( gdi_display, physDev->gc, pixel );
|
XSetForeground( gdi_display, physDev->gc, pixel );
|
||||||
XSetFunction( gdi_display, physDev->gc, GXcopy );
|
XSetFunction( gdi_display, physDev->gc, GXcopy );
|
||||||
XDrawPoint( gdi_display, physDev->drawable, physDev->gc, x, y );
|
XDrawPoint( gdi_display, physDev->drawable, physDev->gc,
|
||||||
|
physDev->org.x + pt.x, physDev->org.y + y );
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
|
|
||||||
/* Update the DIBSection from the pixmap */
|
/* Update the DIBSection from the pixmap */
|
||||||
@ -899,18 +898,22 @@ X11DRV_GetPixel( X11DRV_PDEVICE *physDev, INT x, INT y )
|
|||||||
static Pixmap pixmap = 0;
|
static Pixmap pixmap = 0;
|
||||||
XImage * image;
|
XImage * image;
|
||||||
int pixel;
|
int pixel;
|
||||||
|
POINT pt;
|
||||||
DC *dc = physDev->dc;
|
DC *dc = physDev->dc;
|
||||||
|
|
||||||
|
pt.x = x;
|
||||||
|
pt.y = y;
|
||||||
|
LPtoDP( physDev->hdc, &pt, 1 );
|
||||||
|
|
||||||
/* Update the pixmap from the DIB section */
|
/* Update the pixmap from the DIB section */
|
||||||
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
|
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
|
||||||
|
|
||||||
x = dc->DCOrgX + INTERNAL_XWPTODP( dc, x, y );
|
|
||||||
y = dc->DCOrgY + INTERNAL_YWPTODP( dc, x, y );
|
|
||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
if (dc->flags & DC_MEMORY)
|
if (dc->flags & DC_MEMORY)
|
||||||
{
|
{
|
||||||
image = XGetImage( gdi_display, physDev->drawable, x, y, 1, 1,
|
image = XGetImage( gdi_display, physDev->drawable,
|
||||||
AllPlanes, ZPixmap );
|
physDev->org.x + pt.x, physDev->org.y + pt.y,
|
||||||
|
1, 1, AllPlanes, ZPixmap );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -919,7 +922,7 @@ X11DRV_GetPixel( X11DRV_PDEVICE *physDev, INT x, INT y )
|
|||||||
if (!pixmap) pixmap = XCreatePixmap( gdi_display, root_window,
|
if (!pixmap) pixmap = XCreatePixmap( gdi_display, root_window,
|
||||||
1, 1, dc->bitsPerPixel );
|
1, 1, dc->bitsPerPixel );
|
||||||
XCopyArea( gdi_display, physDev->drawable, pixmap, BITMAP_colorGC,
|
XCopyArea( gdi_display, physDev->drawable, pixmap, BITMAP_colorGC,
|
||||||
x, y, 1, 1, 0, 0 );
|
physDev->org.x + pt.x, physDev->org.y + pt.y, 1, 1, 0, 0 );
|
||||||
image = XGetImage( gdi_display, pixmap, 0, 0, 1, 1, AllPlanes, ZPixmap );
|
image = XGetImage( gdi_display, pixmap, 0, 0, 1, 1, AllPlanes, ZPixmap );
|
||||||
}
|
}
|
||||||
pixel = XGetPixel( image, 0, 0 );
|
pixel = XGetPixel( image, 0, 0 );
|
||||||
@ -939,8 +942,6 @@ X11DRV_GetPixel( X11DRV_PDEVICE *physDev, INT x, INT y )
|
|||||||
BOOL
|
BOOL
|
||||||
X11DRV_PaintRgn( X11DRV_PDEVICE *physDev, HRGN hrgn )
|
X11DRV_PaintRgn( X11DRV_PDEVICE *physDev, HRGN hrgn )
|
||||||
{
|
{
|
||||||
DC *dc = physDev->dc;
|
|
||||||
|
|
||||||
if (X11DRV_SetupGCForBrush( physDev ))
|
if (X11DRV_SetupGCForBrush( physDev ))
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -951,8 +952,8 @@ X11DRV_PaintRgn( X11DRV_PDEVICE *physDev, HRGN hrgn )
|
|||||||
rect = (XRectangle *)data->Buffer;
|
rect = (XRectangle *)data->Buffer;
|
||||||
for (i = 0; i < data->rdh.nCount; i++)
|
for (i = 0; i < data->rdh.nCount; i++)
|
||||||
{
|
{
|
||||||
rect[i].x += dc->DCOrgX;
|
rect[i].x += physDev->org.x;
|
||||||
rect[i].y += dc->DCOrgY;
|
rect[i].y += physDev->org.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
|
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
|
||||||
@ -985,8 +986,8 @@ X11DRV_Polyline( X11DRV_PDEVICE *physDev, const POINT* pt, INT count )
|
|||||||
}
|
}
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
points[i].x = dc->DCOrgX + INTERNAL_XWPTODP( dc, pt[i].x, pt[i].y );
|
points[i].x = physDev->org.x + INTERNAL_XWPTODP( dc, pt[i].x, pt[i].y );
|
||||||
points[i].y = dc->DCOrgY + INTERNAL_YWPTODP( dc, pt[i].x, pt[i].y );
|
points[i].y = physDev->org.y + INTERNAL_YWPTODP( dc, pt[i].x, pt[i].y );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (X11DRV_SetupGCForPen ( physDev ))
|
if (X11DRV_SetupGCForPen ( physDev ))
|
||||||
@ -1025,8 +1026,8 @@ X11DRV_Polygon( X11DRV_PDEVICE *physDev, const POINT* pt, INT count )
|
|||||||
}
|
}
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
points[i].x = dc->DCOrgX + INTERNAL_XWPTODP( dc, pt[i].x, pt[i].y );
|
points[i].x = physDev->org.x + INTERNAL_XWPTODP( dc, pt[i].x, pt[i].y );
|
||||||
points[i].y = dc->DCOrgY + INTERNAL_YWPTODP( dc, pt[i].x, pt[i].y );
|
points[i].y = physDev->org.y + INTERNAL_YWPTODP( dc, pt[i].x, pt[i].y );
|
||||||
}
|
}
|
||||||
points[count] = points[0];
|
points[count] = points[0];
|
||||||
|
|
||||||
@ -1090,8 +1091,8 @@ X11DRV_PolyPolygon( X11DRV_PDEVICE *physDev, const POINT* pt, const INT* counts,
|
|||||||
{
|
{
|
||||||
for (j = 0; j < counts[i]; j++)
|
for (j = 0; j < counts[i]; j++)
|
||||||
{
|
{
|
||||||
points[j].x = dc->DCOrgX + INTERNAL_XWPTODP( dc, pt->x, pt->y );
|
points[j].x = physDev->org.x + INTERNAL_XWPTODP( dc, pt->x, pt->y );
|
||||||
points[j].y = dc->DCOrgY + INTERNAL_YWPTODP( dc, pt->x, pt->y );
|
points[j].y = physDev->org.y + INTERNAL_YWPTODP( dc, pt->x, pt->y );
|
||||||
pt++;
|
pt++;
|
||||||
}
|
}
|
||||||
points[j] = points[0];
|
points[j] = points[0];
|
||||||
@ -1134,8 +1135,8 @@ X11DRV_PolyPolyline( X11DRV_PDEVICE *physDev, const POINT* pt, const DWORD* coun
|
|||||||
{
|
{
|
||||||
for (j = 0; j < counts[i]; j++)
|
for (j = 0; j < counts[i]; j++)
|
||||||
{
|
{
|
||||||
points[j].x = dc->DCOrgX + INTERNAL_XWPTODP( dc, pt->x, pt->y );
|
points[j].x = physDev->org.x + INTERNAL_XWPTODP( dc, pt->x, pt->y );
|
||||||
points[j].y = dc->DCOrgY + INTERNAL_YWPTODP( dc, pt->x, pt->y );
|
points[j].y = physDev->org.y + INTERNAL_YWPTODP( dc, pt->x, pt->y );
|
||||||
pt++;
|
pt++;
|
||||||
}
|
}
|
||||||
TSXDrawLines( gdi_display, physDev->drawable, physDev->gc,
|
TSXDrawLines( gdi_display, physDev->drawable, physDev->gc,
|
||||||
@ -1237,8 +1238,8 @@ X11DRV_ExtFloodFill( X11DRV_PDEVICE *physDev, INT x, INT y, COLORREF color,
|
|||||||
if (GetRgnBox( dc->hGCClipRgn, &rect ) == ERROR) return FALSE;
|
if (GetRgnBox( dc->hGCClipRgn, &rect ) == ERROR) return FALSE;
|
||||||
|
|
||||||
if (!(image = TSXGetImage( gdi_display, physDev->drawable,
|
if (!(image = TSXGetImage( gdi_display, physDev->drawable,
|
||||||
rect.left,
|
physDev->org.x + rect.left,
|
||||||
rect.top,
|
physDev->org.y + rect.top,
|
||||||
rect.right - rect.left,
|
rect.right - rect.left,
|
||||||
rect.bottom - rect.top,
|
rect.bottom - rect.top,
|
||||||
AllPlanes, ZPixmap ))) return FALSE;
|
AllPlanes, ZPixmap ))) return FALSE;
|
||||||
@ -1252,8 +1253,8 @@ X11DRV_ExtFloodFill( X11DRV_PDEVICE *physDev, INT x, INT y, COLORREF color,
|
|||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
XSetFunction( gdi_display, physDev->gc, GXcopy );
|
XSetFunction( gdi_display, physDev->gc, GXcopy );
|
||||||
X11DRV_InternalFloodFill(image, physDev,
|
X11DRV_InternalFloodFill(image, physDev,
|
||||||
XLPTODP(dc,x) + dc->DCOrgX - rect.left,
|
XLPTODP(dc,x) - rect.left,
|
||||||
YLPTODP(dc,y) + dc->DCOrgY - rect.top,
|
YLPTODP(dc,y) - rect.top,
|
||||||
rect.left, rect.top,
|
rect.left, rect.top,
|
||||||
X11DRV_PALETTE_ToPhysical( physDev, color ),
|
X11DRV_PALETTE_ToPhysical( physDev, color ),
|
||||||
fillType );
|
fillType );
|
||||||
@ -1287,22 +1288,24 @@ X11DRV_SetTextColor( X11DRV_PDEVICE *physDev, COLORREF color )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* X11DRV_GetDCOrgEx
|
* GetDCOrgEx (X11DRV.@)
|
||||||
*/
|
*/
|
||||||
BOOL X11DRV_GetDCOrgEx( X11DRV_PDEVICE *physDev, LPPOINT lpp )
|
BOOL X11DRV_GetDCOrgEx( X11DRV_PDEVICE *physDev, LPPOINT lpp )
|
||||||
{
|
{
|
||||||
if (!(physDev->dc->flags & DC_MEMORY))
|
lpp->x = physDev->org.x + physDev->drawable_org.x;
|
||||||
{
|
lpp->y = physDev->org.y + physDev->drawable_org.y;
|
||||||
Window root;
|
|
||||||
int x, y, w, h, border, depth;
|
|
||||||
|
|
||||||
FIXME("this is not correct for managed windows\n");
|
|
||||||
TSXGetGeometry( gdi_display, physDev->drawable, &root,
|
|
||||||
&x, &y, &w, &h, &border, &depth );
|
|
||||||
lpp->x = x;
|
|
||||||
lpp->y = y;
|
|
||||||
}
|
|
||||||
else lpp->x = lpp->y = 0;
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SetDCOrg (X11DRV.@)
|
||||||
|
*/
|
||||||
|
DWORD X11DRV_SetDCOrg( X11DRV_PDEVICE *physDev, INT x, INT y )
|
||||||
|
{
|
||||||
|
DWORD ret = MAKELONG( physDev->org.x + physDev->drawable_org.x,
|
||||||
|
physDev->org.y + physDev->drawable_org.y );
|
||||||
|
physDev->org.x = x - physDev->drawable_org.x;
|
||||||
|
physDev->org.y = y - physDev->drawable_org.y;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
@ -87,7 +87,7 @@ void X11DRV_GDI_Finalize(void)
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* X11DRV_CreateDC
|
* X11DRV_CreateDC
|
||||||
*/
|
*/
|
||||||
BOOL X11DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
|
BOOL X11DRV_CreateDC( DC *dc, X11DRV_PDEVICE **pdev, LPCSTR driver, LPCSTR device,
|
||||||
LPCSTR output, const DEVMODEA* initData )
|
LPCSTR output, const DEVMODEA* initData )
|
||||||
{
|
{
|
||||||
X11DRV_PDEVICE *physDev;
|
X11DRV_PDEVICE *physDev;
|
||||||
@ -99,7 +99,7 @@ BOOL X11DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
|
|||||||
ERR("Can't allocate physDev\n");
|
ERR("Can't allocate physDev\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
dc->physDev = (PHYSDEV)physDev;
|
*pdev = physDev;
|
||||||
physDev->hdc = dc->hSelf;
|
physDev->hdc = dc->hSelf;
|
||||||
physDev->dc = dc; /* FIXME */
|
physDev->dc = dc; /* FIXME */
|
||||||
|
|
||||||
@ -112,6 +112,8 @@ BOOL X11DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
|
|||||||
physDev->drawable = root_window;
|
physDev->drawable = root_window;
|
||||||
dc->bitsPerPixel = screen_depth;
|
dc->bitsPerPixel = screen_depth;
|
||||||
}
|
}
|
||||||
|
physDev->org.x = physDev->org.y = 0;
|
||||||
|
physDev->drawable_org.x = physDev->drawable_org.y = 0;
|
||||||
|
|
||||||
physDev->current_pf = 0;
|
physDev->current_pf = 0;
|
||||||
physDev->used_visuals = 0;
|
physDev->used_visuals = 0;
|
||||||
@ -131,8 +133,6 @@ BOOL X11DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
|
|||||||
*/
|
*/
|
||||||
BOOL X11DRV_DeleteDC( X11DRV_PDEVICE *physDev )
|
BOOL X11DRV_DeleteDC( X11DRV_PDEVICE *physDev )
|
||||||
{
|
{
|
||||||
DC *dc = physDev->dc;
|
|
||||||
|
|
||||||
if(physDev->xrender)
|
if(physDev->xrender)
|
||||||
X11DRV_XRender_DeleteDC( physDev );
|
X11DRV_XRender_DeleteDC( physDev );
|
||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
@ -141,7 +141,6 @@ BOOL X11DRV_DeleteDC( X11DRV_PDEVICE *physDev )
|
|||||||
XFree(physDev->visuals[physDev->used_visuals]);
|
XFree(physDev->visuals[physDev->used_visuals]);
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
HeapFree( GetProcessHeap(), 0, physDev );
|
HeapFree( GetProcessHeap(), 0, physDev );
|
||||||
dc->physDev = NULL;
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
|
|||||||
dibUpdateFlag = TRUE;
|
dibUpdateFlag = TRUE;
|
||||||
TSXSetForeground( gdi_display, physDev->gc, physDev->backgroundPixel );
|
TSXSetForeground( gdi_display, physDev->gc, physDev->backgroundPixel );
|
||||||
TSXFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
TSXFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + rect.left, dc->DCOrgY + rect.top,
|
physDev->org.x + rect.left, physDev->org.y + rect.top,
|
||||||
rect.right-rect.left, rect.bottom-rect.top );
|
rect.right-rect.left, rect.bottom-rect.top );
|
||||||
}
|
}
|
||||||
if (!count) goto END; /* Nothing more to do */
|
if (!count) goto END; /* Nothing more to do */
|
||||||
@ -235,10 +235,8 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
|
|||||||
{
|
{
|
||||||
TSXSetForeground( gdi_display, physDev->gc, physDev->backgroundPixel );
|
TSXSetForeground( gdi_display, physDev->gc, physDev->backgroundPixel );
|
||||||
TSXFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
TSXFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + x,
|
physDev->org.x + x, physDev->org.y + y - ascent,
|
||||||
dc->DCOrgY + y - ascent,
|
width, ascent + descent );
|
||||||
width,
|
|
||||||
ascent + descent );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -254,7 +252,7 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
|
|||||||
{
|
{
|
||||||
X11DRV_cptable[pfo->fi->cptable].pDrawString(
|
X11DRV_cptable[pfo->fi->cptable].pDrawString(
|
||||||
pfo, gdi_display, physDev->drawable, physDev->gc,
|
pfo, gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + x, dc->DCOrgY + y, str2b, count );
|
physDev->org.x + x, physDev->org.y + y, str2b, count );
|
||||||
}
|
}
|
||||||
else /* Now the fun begins... */
|
else /* Now the fun begins... */
|
||||||
{
|
{
|
||||||
@ -326,7 +324,7 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
|
|||||||
|
|
||||||
X11DRV_cptable[pfo->fi->cptable].pDrawText( pfo, gdi_display,
|
X11DRV_cptable[pfo->fi->cptable].pDrawText( pfo, gdi_display,
|
||||||
physDev->drawable, physDev->gc,
|
physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + x, dc->DCOrgY + y, items, pitem - items );
|
physDev->org.x + x, physDev->org.y + y, items, pitem - items );
|
||||||
HeapFree( GetProcessHeap(), 0, items );
|
HeapFree( GetProcessHeap(), 0, items );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -340,9 +338,9 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
|
|||||||
{
|
{
|
||||||
int char_metric_offset = str2b[i].byte2 + (str2b[i].byte1 << 8)
|
int char_metric_offset = str2b[i].byte2 + (str2b[i].byte1 << 8)
|
||||||
- font->min_char_or_byte2;
|
- font->min_char_or_byte2;
|
||||||
int x_i = IROUND((double) (dc->DCOrgX + x) + offset *
|
int x_i = IROUND((double) (physDev->org.x + x) + offset *
|
||||||
pfo->lpX11Trans->a / pfo->lpX11Trans->pixelsize );
|
pfo->lpX11Trans->a / pfo->lpX11Trans->pixelsize );
|
||||||
int y_i = IROUND((double) (dc->DCOrgY + y) - offset *
|
int y_i = IROUND((double) (physDev->org.y + y) - offset *
|
||||||
pfo->lpX11Trans->b / pfo->lpX11Trans->pixelsize );
|
pfo->lpX11Trans->b / pfo->lpX11Trans->pixelsize );
|
||||||
|
|
||||||
X11DRV_cptable[pfo->fi->cptable].pDrawString(
|
X11DRV_cptable[pfo->fi->cptable].pDrawString(
|
||||||
@ -380,8 +378,8 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
|
|||||||
TSXSetLineAttributes( gdi_display, physDev->gc, lineWidth,
|
TSXSetLineAttributes( gdi_display, physDev->gc, lineWidth,
|
||||||
LineSolid, CapRound, JoinBevel );
|
LineSolid, CapRound, JoinBevel );
|
||||||
TSXDrawLine( gdi_display, physDev->drawable, physDev->gc,
|
TSXDrawLine( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + x, dc->DCOrgY + y + linePos,
|
physDev->org.x + x, physDev->org.y + y + linePos,
|
||||||
dc->DCOrgX + x + width, dc->DCOrgY + y + linePos );
|
physDev->org.x + x + width, physDev->org.y + y + linePos );
|
||||||
}
|
}
|
||||||
if (lfStrikeOut)
|
if (lfStrikeOut)
|
||||||
{
|
{
|
||||||
@ -393,8 +391,8 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
|
|||||||
TSXSetLineAttributes( gdi_display, physDev->gc, lineAscent + lineDescent,
|
TSXSetLineAttributes( gdi_display, physDev->gc, lineAscent + lineDescent,
|
||||||
LineSolid, CapRound, JoinBevel );
|
LineSolid, CapRound, JoinBevel );
|
||||||
TSXDrawLine( gdi_display, physDev->drawable, physDev->gc,
|
TSXDrawLine( gdi_display, physDev->drawable, physDev->gc,
|
||||||
dc->DCOrgX + x, dc->DCOrgY + y - lineAscent,
|
physDev->org.x + x, physDev->org.y + y - lineAscent,
|
||||||
dc->DCOrgX + x + width, dc->DCOrgY + y - lineAscent );
|
physDev->org.x + x + width, physDev->org.y + y - lineAscent );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & ETO_CLIPPED) RestoreVisRgn16( dc->hSelf );
|
if (flags & ETO_CLIPPED) RestoreVisRgn16( dc->hSelf );
|
||||||
|
@ -131,8 +131,6 @@ typedef struct tagDC
|
|||||||
|
|
||||||
INT MapMode;
|
INT MapMode;
|
||||||
INT GraphicsMode; /* Graphics mode */
|
INT GraphicsMode; /* Graphics mode */
|
||||||
INT DCOrgX; /* DC origin */
|
|
||||||
INT DCOrgY;
|
|
||||||
ABORTPROC pAbortProc; /* AbortProc for Printing */
|
ABORTPROC pAbortProc; /* AbortProc for Printing */
|
||||||
ABORTPROC16 pAbortProc16;
|
ABORTPROC16 pAbortProc16;
|
||||||
INT CursPosX; /* Current position */
|
INT CursPosX; /* Current position */
|
||||||
@ -162,7 +160,7 @@ typedef struct tagDC_FUNCS
|
|||||||
BOOL (*pChord)(PHYSDEV,INT,INT,INT,INT,INT,INT,INT,INT);
|
BOOL (*pChord)(PHYSDEV,INT,INT,INT,INT,INT,INT,INT,INT);
|
||||||
BOOL (*pCloseFigure)(PHYSDEV);
|
BOOL (*pCloseFigure)(PHYSDEV);
|
||||||
BOOL (*pCreateBitmap)(PHYSDEV,HBITMAP);
|
BOOL (*pCreateBitmap)(PHYSDEV,HBITMAP);
|
||||||
BOOL (*pCreateDC)(DC *,LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
|
BOOL (*pCreateDC)(DC *,PHYSDEV *,LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
|
||||||
HBITMAP (*pCreateDIBSection)(PHYSDEV,BITMAPINFO *,UINT,LPVOID *,HANDLE,DWORD,DWORD);
|
HBITMAP (*pCreateDIBSection)(PHYSDEV,BITMAPINFO *,UINT,LPVOID *,HANDLE,DWORD,DWORD);
|
||||||
BOOL (*pDeleteBitmap)(HBITMAP);
|
BOOL (*pDeleteBitmap)(HBITMAP);
|
||||||
BOOL (*pDeleteDC)(PHYSDEV);
|
BOOL (*pDeleteDC)(PHYSDEV);
|
||||||
@ -232,6 +230,7 @@ typedef struct tagDC_FUNCS
|
|||||||
LONG (*pSetBitmapBits)(HBITMAP,const void*,LONG);
|
LONG (*pSetBitmapBits)(HBITMAP,const void*,LONG);
|
||||||
COLORREF (*pSetBkColor)(PHYSDEV,COLORREF);
|
COLORREF (*pSetBkColor)(PHYSDEV,COLORREF);
|
||||||
INT (*pSetBkMode)(PHYSDEV,INT);
|
INT (*pSetBkMode)(PHYSDEV,INT);
|
||||||
|
DWORD (*pSetDCOrg)(PHYSDEV,INT,INT);
|
||||||
UINT (*pSetDIBColorTable)(PHYSDEV,UINT,UINT,const RGBQUAD*);
|
UINT (*pSetDIBColorTable)(PHYSDEV,UINT,UINT,const RGBQUAD*);
|
||||||
INT (*pSetDIBits)(PHYSDEV,HBITMAP,UINT,UINT,LPCVOID,const BITMAPINFO*,UINT);
|
INT (*pSetDIBits)(PHYSDEV,HBITMAP,UINT,UINT,LPCVOID,const BITMAPINFO*,UINT);
|
||||||
INT (*pSetDIBitsToDevice)(PHYSDEV,INT,INT,DWORD,DWORD,INT,INT,UINT,UINT,LPCVOID,
|
INT (*pSetDIBitsToDevice)(PHYSDEV,INT,INT,DWORD,DWORD,INT,INT,UINT,UINT,LPCVOID,
|
||||||
|
@ -82,6 +82,8 @@ typedef struct
|
|||||||
DC *dc; /* direct pointer to DC, should go away */
|
DC *dc; /* direct pointer to DC, should go away */
|
||||||
GC gc; /* X Window GC */
|
GC gc; /* X Window GC */
|
||||||
Drawable drawable;
|
Drawable drawable;
|
||||||
|
POINT org; /* DC origin relative to drawable */
|
||||||
|
POINT drawable_org; /* Origin of drawable relative to screen */
|
||||||
X_PHYSFONT font;
|
X_PHYSFONT font;
|
||||||
X_PHYSPEN pen;
|
X_PHYSPEN pen;
|
||||||
X_PHYSBRUSH brush;
|
X_PHYSBRUSH brush;
|
||||||
@ -193,7 +195,8 @@ extern Pixmap X11DRV_DIB_CreatePixmapFromDIB( HGLOBAL hPackedDIB, HDC hdc );
|
|||||||
extern Pixmap X11DRV_BITMAP_CreatePixmapFromBitmap( HBITMAP hBmp, HDC hdc );
|
extern Pixmap X11DRV_BITMAP_CreatePixmapFromBitmap( HBITMAP hBmp, HDC hdc );
|
||||||
|
|
||||||
extern RGNDATA *X11DRV_GetRegionData( HRGN hrgn, HDC hdc_lptodp );
|
extern RGNDATA *X11DRV_GetRegionData( HRGN hrgn, HDC hdc_lptodp );
|
||||||
extern void X11DRV_SetDrawable( HDC hdc, Drawable drawable, int mode, int org_x, int org_y );
|
extern void X11DRV_SetDrawable( HDC hdc, Drawable drawable, int mode, const POINT *org,
|
||||||
|
const POINT *drawable_org );
|
||||||
extern void X11DRV_StartGraphicsExposures( HDC hdc );
|
extern void X11DRV_StartGraphicsExposures( HDC hdc );
|
||||||
extern void X11DRV_EndGraphicsExposures( HDC hdc, HRGN hrgn );
|
extern void X11DRV_EndGraphicsExposures( HDC hdc, HRGN hrgn );
|
||||||
|
|
||||||
|
@ -121,12 +121,10 @@ INT WINAPI ExtSelectClipRgn( HDC hdc, HRGN hrgn, INT fnMode )
|
|||||||
dc->hClipRgn = CreateRectRgnIndirect( &rect );
|
dc->hClipRgn = CreateRectRgnIndirect( &rect );
|
||||||
}
|
}
|
||||||
|
|
||||||
OffsetRgn( dc->hClipRgn, -dc->DCOrgX, -dc->DCOrgY );
|
|
||||||
if(fnMode == RGN_COPY)
|
if(fnMode == RGN_COPY)
|
||||||
retval = CombineRgn( dc->hClipRgn, hrgn, 0, fnMode );
|
retval = CombineRgn( dc->hClipRgn, hrgn, 0, fnMode );
|
||||||
else
|
else
|
||||||
retval = CombineRgn( dc->hClipRgn, dc->hClipRgn, hrgn, fnMode);
|
retval = CombineRgn( dc->hClipRgn, dc->hClipRgn, hrgn, fnMode);
|
||||||
OffsetRgn( dc->hClipRgn, dc->DCOrgX, dc->DCOrgY );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CLIPPING_UpdateGCRegion( dc );
|
CLIPPING_UpdateGCRegion( dc );
|
||||||
@ -230,10 +228,10 @@ INT WINAPI ExcludeClipRect( HDC hdc, INT left, INT top,
|
|||||||
ret = dc->funcs->pExcludeClipRect( dc->physDev, left, top, right, bottom );
|
ret = dc->funcs->pExcludeClipRect( dc->physDev, left, top, right, bottom );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
left = dc->DCOrgX + XLPTODP( dc, left );
|
left = XLPTODP( dc, left );
|
||||||
right = dc->DCOrgX + XLPTODP( dc, right );
|
right = XLPTODP( dc, right );
|
||||||
top = dc->DCOrgY + YLPTODP( dc, top );
|
top = YLPTODP( dc, top );
|
||||||
bottom = dc->DCOrgY + YLPTODP( dc, bottom );
|
bottom = YLPTODP( dc, bottom );
|
||||||
|
|
||||||
if (!(newRgn = CreateRectRgn( left, top, right, bottom ))) ret = ERROR;
|
if (!(newRgn = CreateRectRgn( left, top, right, bottom ))) ret = ERROR;
|
||||||
else
|
else
|
||||||
@ -279,10 +277,10 @@ INT WINAPI IntersectClipRect( HDC hdc, INT left, INT top,
|
|||||||
ret = dc->funcs->pIntersectClipRect( dc->physDev, left, top, right, bottom );
|
ret = dc->funcs->pIntersectClipRect( dc->physDev, left, top, right, bottom );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
left = dc->DCOrgX + XLPTODP( dc, left );
|
left = XLPTODP( dc, left );
|
||||||
right = dc->DCOrgX + XLPTODP( dc, right );
|
right = XLPTODP( dc, right );
|
||||||
top = dc->DCOrgY + YLPTODP( dc, top );
|
top = YLPTODP( dc, top );
|
||||||
bottom = dc->DCOrgY + YLPTODP( dc, bottom );
|
bottom = YLPTODP( dc, bottom );
|
||||||
|
|
||||||
if (!dc->hClipRgn)
|
if (!dc->hClipRgn)
|
||||||
{
|
{
|
||||||
@ -318,10 +316,10 @@ INT16 WINAPI ExcludeVisRect16( HDC16 hdc, INT16 left, INT16 top,
|
|||||||
DC * dc = DC_GetDCUpdate( hdc );
|
DC * dc = DC_GetDCUpdate( hdc );
|
||||||
if (!dc) return ERROR;
|
if (!dc) return ERROR;
|
||||||
|
|
||||||
left = dc->DCOrgX + XLPTODP( dc, left );
|
left = XLPTODP( dc, left );
|
||||||
right = dc->DCOrgX + XLPTODP( dc, right );
|
right = XLPTODP( dc, right );
|
||||||
top = dc->DCOrgY + YLPTODP( dc, top );
|
top = YLPTODP( dc, top );
|
||||||
bottom = dc->DCOrgY + YLPTODP( dc, bottom );
|
bottom = YLPTODP( dc, bottom );
|
||||||
|
|
||||||
TRACE("%04x %dx%d,%dx%d\n", hdc, left, top, right, bottom );
|
TRACE("%04x %dx%d,%dx%d\n", hdc, left, top, right, bottom );
|
||||||
|
|
||||||
@ -348,10 +346,10 @@ INT16 WINAPI IntersectVisRect16( HDC16 hdc, INT16 left, INT16 top,
|
|||||||
DC * dc = DC_GetDCUpdate( hdc );
|
DC * dc = DC_GetDCUpdate( hdc );
|
||||||
if (!dc) return ERROR;
|
if (!dc) return ERROR;
|
||||||
|
|
||||||
left = dc->DCOrgX + XLPTODP( dc, left );
|
left = XLPTODP( dc, left );
|
||||||
right = dc->DCOrgX + XLPTODP( dc, right );
|
right = XLPTODP( dc, right );
|
||||||
top = dc->DCOrgY + YLPTODP( dc, top );
|
top = YLPTODP( dc, top );
|
||||||
bottom = dc->DCOrgY + YLPTODP( dc, bottom );
|
bottom = YLPTODP( dc, bottom );
|
||||||
|
|
||||||
TRACE("%04x %dx%d,%dx%d\n", hdc, left, top, right, bottom );
|
TRACE("%04x %dx%d,%dx%d\n", hdc, left, top, right, bottom );
|
||||||
|
|
||||||
@ -388,8 +386,7 @@ BOOL WINAPI PtVisible( HDC hdc, INT x, INT y )
|
|||||||
if (!dc) return FALSE;
|
if (!dc) return FALSE;
|
||||||
if (dc->hGCClipRgn)
|
if (dc->hGCClipRgn)
|
||||||
{
|
{
|
||||||
ret = PtInRegion( dc->hGCClipRgn, XLPTODP(dc,x) + dc->DCOrgX,
|
ret = PtInRegion( dc->hGCClipRgn, XLPTODP(dc,x), YLPTODP(dc,y) );
|
||||||
YLPTODP(dc,y) + dc->DCOrgY );
|
|
||||||
}
|
}
|
||||||
GDI_ReleaseObj( hdc );
|
GDI_ReleaseObj( hdc );
|
||||||
return ret;
|
return ret;
|
||||||
@ -424,10 +421,6 @@ BOOL WINAPI RectVisible( HDC hdc, const RECT* rect )
|
|||||||
/* copy rectangle to avoid overwriting by LPtoDP */
|
/* copy rectangle to avoid overwriting by LPtoDP */
|
||||||
tmpRect = *rect;
|
tmpRect = *rect;
|
||||||
LPtoDP( hdc, (LPPOINT)&tmpRect, 2 );
|
LPtoDP( hdc, (LPPOINT)&tmpRect, 2 );
|
||||||
tmpRect.left += dc->DCOrgX;
|
|
||||||
tmpRect.right += dc->DCOrgX;
|
|
||||||
tmpRect.top += dc->DCOrgY;
|
|
||||||
tmpRect.bottom += dc->DCOrgY;
|
|
||||||
ret = RectInRegion( dc->hGCClipRgn, &tmpRect );
|
ret = RectInRegion( dc->hGCClipRgn, &tmpRect );
|
||||||
}
|
}
|
||||||
GDI_ReleaseObj( hdc );
|
GDI_ReleaseObj( hdc );
|
||||||
@ -444,10 +437,6 @@ INT16 WINAPI GetClipBox16( HDC16 hdc, LPRECT16 rect )
|
|||||||
DC *dc = DC_GetDCUpdate( hdc );
|
DC *dc = DC_GetDCUpdate( hdc );
|
||||||
if (!dc) return ERROR;
|
if (!dc) return ERROR;
|
||||||
ret = GetRgnBox16( dc->hGCClipRgn, rect );
|
ret = GetRgnBox16( dc->hGCClipRgn, rect );
|
||||||
rect->left -= dc->DCOrgX;
|
|
||||||
rect->right -= dc->DCOrgX;
|
|
||||||
rect->top -= dc->DCOrgY;
|
|
||||||
rect->bottom -= dc->DCOrgY;
|
|
||||||
DPtoLP16( hdc, (LPPOINT16)rect, 2 );
|
DPtoLP16( hdc, (LPPOINT16)rect, 2 );
|
||||||
TRACE("%d,%d-%d,%d\n", rect->left,rect->top,rect->right,rect->bottom );
|
TRACE("%d,%d-%d,%d\n", rect->left,rect->top,rect->right,rect->bottom );
|
||||||
GDI_ReleaseObj( hdc );
|
GDI_ReleaseObj( hdc );
|
||||||
@ -464,10 +453,6 @@ INT WINAPI GetClipBox( HDC hdc, LPRECT rect )
|
|||||||
DC *dc = DC_GetDCUpdate( hdc );
|
DC *dc = DC_GetDCUpdate( hdc );
|
||||||
if (!dc) return ERROR;
|
if (!dc) return ERROR;
|
||||||
ret = GetRgnBox( dc->hGCClipRgn, rect );
|
ret = GetRgnBox( dc->hGCClipRgn, rect );
|
||||||
rect->left -= dc->DCOrgX;
|
|
||||||
rect->right -= dc->DCOrgX;
|
|
||||||
rect->top -= dc->DCOrgY;
|
|
||||||
rect->bottom -= dc->DCOrgY;
|
|
||||||
DPtoLP( hdc, (LPPOINT)rect, 2 );
|
DPtoLP( hdc, (LPPOINT)rect, 2 );
|
||||||
GDI_ReleaseObj( hdc );
|
GDI_ReleaseObj( hdc );
|
||||||
return ret;
|
return ret;
|
||||||
@ -485,14 +470,7 @@ INT WINAPI GetClipRgn( HDC hdc, HRGN hRgn )
|
|||||||
{
|
{
|
||||||
if( dc->hClipRgn )
|
if( dc->hClipRgn )
|
||||||
{
|
{
|
||||||
/* this assumes that dc->hClipRgn is in coordinates
|
if( CombineRgn(hRgn, dc->hClipRgn, 0, RGN_COPY) != ERROR ) ret = 1;
|
||||||
relative to the device (not DC origin) */
|
|
||||||
|
|
||||||
if( CombineRgn(hRgn, dc->hClipRgn, 0, RGN_COPY) != ERROR )
|
|
||||||
{
|
|
||||||
OffsetRgn( hRgn, -dc->DCOrgX, -dc->DCOrgY );
|
|
||||||
ret = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else ret = 0;
|
else ret = 0;
|
||||||
GDI_ReleaseObj( hdc );
|
GDI_ReleaseObj( hdc );
|
||||||
|
25
objects/dc.c
25
objects/dc.c
@ -107,8 +107,6 @@ DC *DC_AllocDC( const DC_FUNCTIONS *funcs )
|
|||||||
dc->bitsPerPixel = 1;
|
dc->bitsPerPixel = 1;
|
||||||
dc->MapMode = MM_TEXT;
|
dc->MapMode = MM_TEXT;
|
||||||
dc->GraphicsMode = GM_COMPATIBLE;
|
dc->GraphicsMode = GM_COMPATIBLE;
|
||||||
dc->DCOrgX = 0;
|
|
||||||
dc->DCOrgY = 0;
|
|
||||||
dc->pAbortProc = NULL;
|
dc->pAbortProc = NULL;
|
||||||
dc->CursPosX = 0;
|
dc->CursPosX = 0;
|
||||||
dc->CursPosY = 0;
|
dc->CursPosY = 0;
|
||||||
@ -310,11 +308,6 @@ HDC16 WINAPI GetDCState16( HDC16 hdc )
|
|||||||
newdc->breakRem = dc->breakRem;
|
newdc->breakRem = dc->breakRem;
|
||||||
newdc->MapMode = dc->MapMode;
|
newdc->MapMode = dc->MapMode;
|
||||||
newdc->GraphicsMode = dc->GraphicsMode;
|
newdc->GraphicsMode = dc->GraphicsMode;
|
||||||
#if 0
|
|
||||||
/* Apparently, the DC origin is not changed by [GS]etDCState */
|
|
||||||
newdc->DCOrgX = dc->DCOrgX;
|
|
||||||
newdc->DCOrgY = dc->DCOrgY;
|
|
||||||
#endif
|
|
||||||
newdc->CursPosX = dc->CursPosX;
|
newdc->CursPosX = dc->CursPosX;
|
||||||
newdc->CursPosY = dc->CursPosY;
|
newdc->CursPosY = dc->CursPosY;
|
||||||
newdc->ArcDirection = dc->ArcDirection;
|
newdc->ArcDirection = dc->ArcDirection;
|
||||||
@ -403,11 +396,6 @@ void WINAPI SetDCState16( HDC16 hdc, HDC16 hdcs )
|
|||||||
dc->breakRem = dcs->breakRem;
|
dc->breakRem = dcs->breakRem;
|
||||||
dc->MapMode = dcs->MapMode;
|
dc->MapMode = dcs->MapMode;
|
||||||
dc->GraphicsMode = dcs->GraphicsMode;
|
dc->GraphicsMode = dcs->GraphicsMode;
|
||||||
#if 0
|
|
||||||
/* Apparently, the DC origin is not changed by [GS]etDCState */
|
|
||||||
dc->DCOrgX = dcs->DCOrgX;
|
|
||||||
dc->DCOrgY = dcs->DCOrgY;
|
|
||||||
#endif
|
|
||||||
dc->CursPosX = dcs->CursPosX;
|
dc->CursPosX = dcs->CursPosX;
|
||||||
dc->CursPosY = dcs->CursPosY;
|
dc->CursPosY = dcs->CursPosY;
|
||||||
dc->ArcDirection = dcs->ArcDirection;
|
dc->ArcDirection = dcs->ArcDirection;
|
||||||
@ -620,7 +608,7 @@ HDC WINAPI CreateDCA( LPCSTR driver, LPCSTR device, LPCSTR output,
|
|||||||
debugstr_a(driver), debugstr_a(device), debugstr_a(output), dc->hSelf );
|
debugstr_a(driver), debugstr_a(device), debugstr_a(output), dc->hSelf );
|
||||||
|
|
||||||
if (dc->funcs->pCreateDC &&
|
if (dc->funcs->pCreateDC &&
|
||||||
!dc->funcs->pCreateDC( dc, buf, device, output, initData ))
|
!dc->funcs->pCreateDC( dc, &dc->physDev, buf, device, output, initData ))
|
||||||
{
|
{
|
||||||
WARN("creation aborted by device\n" );
|
WARN("creation aborted by device\n" );
|
||||||
GDI_FreeObject( dc->hSelf, dc );
|
GDI_FreeObject( dc->hSelf, dc );
|
||||||
@ -740,7 +728,7 @@ HDC WINAPI CreateCompatibleDC( HDC hdc )
|
|||||||
if ((origDC = GDI_GetObjPtr( hdc, DC_MAGIC ))) dc->physDev = origDC->physDev;
|
if ((origDC = GDI_GetObjPtr( hdc, DC_MAGIC ))) dc->physDev = origDC->physDev;
|
||||||
|
|
||||||
if (dc->funcs->pCreateDC &&
|
if (dc->funcs->pCreateDC &&
|
||||||
!dc->funcs->pCreateDC( dc, NULL, NULL, NULL, NULL ))
|
!dc->funcs->pCreateDC( dc, &dc->physDev, NULL, NULL, NULL, NULL ))
|
||||||
{
|
{
|
||||||
WARN("creation aborted by device\n");
|
WARN("creation aborted by device\n");
|
||||||
GDI_FreeObject( dc->hSelf, dc );
|
GDI_FreeObject( dc->hSelf, dc );
|
||||||
@ -820,6 +808,7 @@ BOOL WINAPI DeleteDC( HDC hdc )
|
|||||||
SelectObject( hdc, GetStockObject(DEFAULT_BITMAP) );
|
SelectObject( hdc, GetStockObject(DEFAULT_BITMAP) );
|
||||||
funcs = dc->funcs;
|
funcs = dc->funcs;
|
||||||
if (dc->funcs->pDeleteDC) dc->funcs->pDeleteDC(dc->physDev);
|
if (dc->funcs->pDeleteDC) dc->funcs->pDeleteDC(dc->physDev);
|
||||||
|
dc->physDev = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dc->hClipRgn) DeleteObject( dc->hClipRgn );
|
if (dc->hClipRgn) DeleteObject( dc->hClipRgn );
|
||||||
@ -1003,8 +992,6 @@ BOOL WINAPI GetDCOrgEx( HDC hDC, LPPOINT lpp )
|
|||||||
|
|
||||||
lpp->x = lpp->y = 0;
|
lpp->x = lpp->y = 0;
|
||||||
if (dc->funcs->pGetDCOrgEx) dc->funcs->pGetDCOrgEx( dc->physDev, lpp );
|
if (dc->funcs->pGetDCOrgEx) dc->funcs->pGetDCOrgEx( dc->physDev, lpp );
|
||||||
lpp->x += dc->DCOrgX;
|
|
||||||
lpp->y += dc->DCOrgY;
|
|
||||||
GDI_ReleaseObj( hDC );
|
GDI_ReleaseObj( hDC );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -1027,12 +1014,10 @@ DWORD WINAPI GetDCOrg16( HDC16 hdc )
|
|||||||
*/
|
*/
|
||||||
DWORD WINAPI SetDCOrg16( HDC16 hdc, INT16 x, INT16 y )
|
DWORD WINAPI SetDCOrg16( HDC16 hdc, INT16 x, INT16 y )
|
||||||
{
|
{
|
||||||
DWORD prevOrg;
|
DWORD prevOrg = 0;
|
||||||
DC *dc = DC_GetDCPtr( hdc );
|
DC *dc = DC_GetDCPtr( hdc );
|
||||||
if (!dc) return 0;
|
if (!dc) return 0;
|
||||||
prevOrg = dc->DCOrgX | (dc->DCOrgY << 16);
|
if (dc->funcs->pSetDCOrg) prevOrg = dc->funcs->pSetDCOrg( dc->physDev, x, y );
|
||||||
dc->DCOrgX = x;
|
|
||||||
dc->DCOrgY = y;
|
|
||||||
GDI_ReleaseObj( hdc );
|
GDI_ReleaseObj( hdc );
|
||||||
return prevOrg;
|
return prevOrg;
|
||||||
}
|
}
|
||||||
|
@ -2920,8 +2920,6 @@ INT WINAPI GetRandomRgn(HDC hDC, HRGN hRgn, DWORD dwCode)
|
|||||||
GetDCOrgEx(hDC, &org);
|
GetDCOrgEx(hDC, &org);
|
||||||
else
|
else
|
||||||
org.x = org.y = 0;
|
org.x = org.y = 0;
|
||||||
org.x -= dc->DCOrgX;
|
|
||||||
org.y -= dc->DCOrgY;
|
|
||||||
OffsetRgn (hRgn, org.x, org.y);
|
OffsetRgn (hRgn, org.x, org.y);
|
||||||
GDI_ReleaseObj( hDC );
|
GDI_ReleaseObj( hDC );
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user