Mercurial > projects > dwt-win
comparison dwt/widgets/Canvas.d @ 115:640928daee8c
Revert the reverting changes
Backed out changeset f353be82b6be
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 11 Feb 2008 04:05:55 +0100 |
parents | f353be82b6be |
children | 25f88bf5a6df |
comparison
equal
deleted
inserted
replaced
113:f353be82b6be | 115:640928daee8c |
---|---|
195 RECT sourceRect; | 195 RECT sourceRect; |
196 OS.SetRect (&sourceRect, x, y, x + width, y + height); | 196 OS.SetRect (&sourceRect, x, y, x + width, y + height); |
197 RECT clientRect; | 197 RECT clientRect; |
198 OS.GetClientRect (handle, &clientRect); | 198 OS.GetClientRect (handle, &clientRect); |
199 if (OS.IntersectRect (&clientRect, &sourceRect, &clientRect)) { | 199 if (OS.IntersectRect (&clientRect, &sourceRect, &clientRect)) { |
200 static if (OS.IsWinCE) { | 200 if (OS.IsWinCE) { |
201 OS.UpdateWindow (handle); | 201 OS.UpdateWindow (handle); |
202 } else { | 202 } else { |
203 int flags = OS.RDW_UPDATENOW | OS.RDW_ALLCHILDREN; | 203 int flags = OS.RDW_UPDATENOW | OS.RDW_ALLCHILDREN; |
204 OS.RedrawWindow (handle, null, null, flags); | 204 OS.RedrawWindow (handle, null, null, flags); |
205 } | 205 } |
206 } | 206 } |
207 int deltaX = destX - x, deltaY = destY - y; | 207 int deltaX = destX - x, deltaY = destY - y; |
208 if (findImageControl () !is null) { | 208 if (findImageControl () !is null) { |
209 static if (OS.IsWinCE) { | 209 if (OS.IsWinCE) { |
210 OS.InvalidateRect (handle, &sourceRect, true); | 210 OS.InvalidateRect (handle, &sourceRect, true); |
211 } else { | 211 } else { |
212 int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE; | 212 int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE; |
213 if (all) flags |= OS.RDW_ALLCHILDREN; | 213 if (all) flags |= OS.RDW_ALLCHILDREN; |
214 OS.RedrawWindow (handle, &sourceRect, null, flags); | 214 OS.RedrawWindow (handle, &sourceRect, null, flags); |
215 } | 215 } |
216 OS.OffsetRect (&sourceRect, deltaX, deltaY); | 216 OS.OffsetRect (&sourceRect, deltaX, deltaY); |
217 static if (OS.IsWinCE) { | 217 if (OS.IsWinCE) { |
218 OS.InvalidateRect (handle, &sourceRect, true); | 218 OS.InvalidateRect (handle, &sourceRect, true); |
219 } else { | 219 } else { |
220 int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE; | 220 int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE; |
221 if (all) flags |= OS.RDW_ALLCHILDREN; | 221 if (all) flags |= OS.RDW_ALLCHILDREN; |
222 OS.RedrawWindow (handle, &sourceRect, null, flags); | 222 OS.RedrawWindow (handle, &sourceRect, null, flags); |