hackathon-dev #1

Merged
amy merged 101 commits from hackathon-dev into develop 2019-12-12 13:56:11 -07:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit e59e6e0bae - Show all commits

View File

@ -220,7 +220,7 @@ PGFXOBJECT DC_SelectObject(PDCTXT pdctxt, PGFXOBJECT pobj)
pdctxt->baserect.bottom = ((PBITMAP)pobj)->height; pdctxt->baserect.bottom = ((PBITMAP)pobj)->height;
G_intersect_rect(&rtmp, &(pdctxt->baserect), &(pdctxt->cliprect)); G_intersect_rect(&rtmp, &(pdctxt->baserect), &(pdctxt->cliprect));
memcpy(&(pdctxt->cliprect), &rtmp, sizeof(RECT)); memcpy(&(pdctxt->cliprect), &rtmp, sizeof(RECT));
return rbmp; return (PGFXOBJECT)rbmp;
} }
Go_release(pobj); Go_release(pobj);
} }
@ -236,9 +236,9 @@ BOOL DC_BitBlt(PDCTXT dest, INT32 x, INT32 y, INT32 width, INT32 height, PDCTXT
if (!G_rect_intersect(&actualdest, &destrect, &(dest->cliprect))) if (!G_rect_intersect(&actualdest, &destrect, &(dest->cliprect)))
return TRUE; /* no-op */ return TRUE; /* no-op */
G_set_rect(&srcrect, x1, y1, x1 + (actualdest.right - actualdest.left), y1 + (actualdest.bottom - actualdest.top)); G_set_rect(&srcrect, x1, y1, x1 + (actualdest.right - actualdest.left), y1 + (actualdest.bottom - actualdest.top));
if (!G_rect_intersect(&actualsrc, &srcrect, &(src->baserect))) if (!G_rect_intersect(&actualsrc, &srcrect, &(source->baserect)))
return TRUE; return TRUE;
actualdest.right = actualdest.left + (actualsrc.right - actualsrc.left); actualdest.right = actualdest.left + (actualsrc.right - actualsrc.left);
actualdest.bottom = actualdest.top + (actualsrc.bottom - actualsrc.top); actualdest.bottom = actualdest.top + (actualsrc.bottom - actualsrc.top);
return (*(dest->funcs->bitblt))(dest->privdata, &actualdest, src->privdata, &actualsrc, rop); return (*(dest->funcs->bitblt))(dest->privdata, &actualdest, source->privdata, &actualsrc, rop);
} }

View File

@ -150,7 +150,7 @@ static PyObject *devctxt_select_bitmap(DevCtxtObject *self, BitmapObject *newbmp
return NULL; return NULL;
} }
old_bitmap = self->selected_bitmap; old_bitmap = self->selected_bitmap;
old_pbmp = DC_SelectObject(self->pdctxt, newbmp->pbmp); old_pbmp = (PBITMAP)DC_SelectObject(self->pdctxt, (PGFXOBJECT)(newbmp->pbmp));
if (!old_bitmap) if (!old_bitmap)
{ {
old_bitmap = Epython_wrap_bitmap(old_pbmp); old_bitmap = Epython_wrap_bitmap(old_pbmp);