3 base class of screen driver
5 Made by Studio Breeze. 2002
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26 #include "sted_screen_win32.h"
33 CSTedScreenWin32::toWindowPos(int in_x, int in_y, int *out_x, int *out_y)
35 if (out_x) *out_x = fWindowWidth * in_x / fX68WindowWidth;
36 if (out_y) *out_y = fWindowHeight * (in_y%fX68WindowHeight) / fX68WindowHeight;
43 CSTedScreenWin32::TextXBox(int in_x0, int in_y0, int in_x1, int in_y1, int in_page)
50 c = PageToColor(in_page);
51 if (!toWindowPos(in_x0, in_y0, &x0, &y0)) return;
52 if (!toWindowPos(in_x1, in_y1, &x1, &y1)) return;
54 ::SetRect(&r, x0, y0, x1, y1);
56 D2D1_RECT_F r1(D2D1::RectF(x0,y0,x1,y1));
57 D2D1_COLOR_F color = D2D1::ColorF(c);
58 ID2D1SolidColorBrushPtr color_brush;
60 text_bitmap_target_->CreateSolidColorBrush(color,&color_brush);
62 sf::begin_draw<ID2D1BitmapRenderTargetPtr> b(text_bitmap_target_);
64 D2D1_ANTIALIAS_MODE backup(text_bitmap_target_->GetAntialiasMode());
65 text_bitmap_target_->SetAntialiasMode(D2D1_ANTIALIAS_MODE_ALIASED);
69 text_bitmap_target_->DrawRectangle(r1,color_brush);
70 //br = ::CreateSolidBrush(c);
73 text_bitmap_target_->DrawRectangle(r1,brush_text_clear_);
74 //br = fBrushTextClear;
77 text_bitmap_target_->SetAntialiasMode(backup);
78 THROW_IF_ERR(b.end_draw());
82 // ::FrameRect(fTextDC, &r, br);
83 // ::FrameRect(fTextMaskDC, &r, MASK_ON);
86 // ::DeleteObject(br);
91 CSTedScreenWin32::TextXXLine(int in_page, int in_x, int in_y, int in_w, int in_linestyle)
98 if (!toWindowPos(in_x, in_y, &x0, &y)) return;
99 if (!toWindowPos(in_x + in_w, in_y, &x1, &y)) return;
101 ID2D1SolidColorBrushPtr brush;
104 sf::begin_draw_bitmap begin(text_bitmap_target_);
106 if (in_linestyle != 0 /*&& in_page!=0*/) {
107 text_bitmap_target_->CreateSolidColorBrush(D2D1::ColorF(PageToColor(in_page)),&brush);
109 text_bitmap_target_->CreateSolidColorBrush(D2D1::ColorF(D2D1::ColorF::White),&brush);
112 D2D1_ANTIALIAS_MODE backup(text_bitmap_target_->GetAntialiasMode());
113 text_bitmap_target_->SetAntialiasMode(D2D1_ANTIALIAS_MODE_ALIASED);
114 text_bitmap_target_->DrawLine(D2D1::Point2F(x0,y),D2D1::Point2F(x1,y),brush);
115 text_bitmap_target_->SetAntialiasMode(backup);
117 //if (in_linestyle != 0 /*&& in_page!=0*/)
119 // p = ::CreatePen(PS_SOLID, 1, PageToColor(in_page));
120 // mp = ::CreatePen(PS_SOLID, 1, RGB(0xff, 0xff, 0xff));
122 // p = ::CreatePen(PS_SOLID, 1, RGB(0xff, 0xff, 0xff));
123 // mp = ::CreatePen(PS_SOLID, 1, RGB(0x00, 0x00, 0x00));
128 // if (p) ::DeleteObject(p);
129 // if (mp) ::DeleteObject(mp);
133 //orig = (HPEN)::SelectObject(fTextDC, p);
134 //morig = (HPEN)::SelectObject(fTextMaskDC, mp);
136 //::MoveToEx(fTextDC, x0,y, NULL);
137 //::LineTo(fTextDC, x1,y);
138 //::MoveToEx(fTextMaskDC, x0,y, NULL);
139 //::LineTo(fTextMaskDC, x1,y);
141 //::SelectObject(fTextDC, orig);
142 //::SelectObject(fTextMaskDC, morig);
143 //if (p) ::DeleteObject(p);
144 //if (mp) ::DeleteObject(mp);
145 THROW_IF_ERR(begin.end_draw());
147 InvalidateRect(x0,y,x1-x0,1);
151 CSTedScreenWin32::TextXYLine(int in_page, int in_x, int in_y, int in_h, int in_linestyle)
158 if (!toWindowPos(in_x, in_y, &x, &y0)) return;
159 if (!toWindowPos(in_x, in_y+in_h, &x, &y1)) return;
161 ID2D1SolidColorBrushPtr brush;
162 sf::begin_draw_bitmap begin(text_bitmap_target_);
164 if (in_linestyle != 0 /*&& in_page!=0*/) {
165 text_bitmap_target_->CreateSolidColorBrush(D2D1::ColorF(PageToColor(in_page)),&brush);
167 text_bitmap_target_->CreateSolidColorBrush(D2D1::ColorF(D2D1::ColorF::White),&brush);
169 D2D1_ANTIALIAS_MODE backup(text_bitmap_target_->GetAntialiasMode());
170 text_bitmap_target_->SetAntialiasMode(D2D1_ANTIALIAS_MODE_ALIASED);
171 text_bitmap_target_->DrawLine(D2D1::Point2F(x,y0),D2D1::Point2F(x,y1),brush);
172 text_bitmap_target_->SetAntialiasMode(backup);
174 THROW_IF_ERR(begin.end_draw());
176 //if (in_linestyle!=0 /*&& in_page!=0*/) {
177 // p = ::CreatePen(PS_SOLID, 1, PageToColor(in_page));
178 // mp = ::CreatePen(PS_SOLID, 1, RGB(0xff, 0xff, 0xff));
180 // p = ::CreatePen(PS_SOLID, 1, RGB(0xff, 0xff, 0xff));
181 // mp = ::CreatePen(PS_SOLID, 1, RGB(0x00, 0x00, 0x00));
184 // if (p) ::DeleteObject(p);
185 // if (mp) ::DeleteObject(mp);
189 //orig = (HPEN)::SelectObject(fTextDC, p);
190 //morig = (HPEN)::SelectObject(fTextMaskDC, mp);
192 //::MoveToEx(fTextDC, x,y0, NULL);
193 //::LineTo(fTextDC, x,y1);
194 //::MoveToEx(fTextMaskDC, x,y0, NULL);
195 //::LineTo(fTextMaskDC, x,y1);
197 //::SelectObject(fTextDC, orig);
198 //::SelectObject(fTextMaskDC, morig);
199 //if (p) ::DeleteObject(p);
200 //if (mp) ::DeleteObject(mp);
202 //InvalidateRect(x,y0,1,y1-y0);
205 void CSTedScreenWin32::TextReverse(int in_x, int in_y, int in_width, int in_page)
212 if (!TextToWindowPos(in_x, in_y, &x, &y)) return;
213 if (!TextToWindowPos(in_width, 0, &w, &h)) return;
217 case 0: page=2;break;
218 case 1: page=0;break;
219 case 2: page=0;break;
220 case 3: page=2;break;
224 sf::begin_draw_bitmap begin(text_bitmap_target_);
226 sf::d2_dc_type dc(new sf::d2_dc(text_dc_target_,D2D1_DC_INITIALIZE_MODE_COPY));
227 c = ::SetTextColor(dc, PageToColor(page));
228 b = ::SetBkColor(dc, RGB(0x00, 0x00, 0x00));
229 ::BitBlt(dc, x,y,w,h, dc, x, y, DSTINVERT);
230 ::SetTextColor(dc,c);
233 THROW_IF_ERR(begin.end_draw());
235 InvalidateRect(x,y,w,h);
239 CSTedScreenWin32::TextReverseArea(int in_r_ad, int in_r_ln, int in_editscr)
247 x0 = (in_editscr==0) ? 2 : 56;
251 if (!TextToWindowPos(x0, y0, &x, &y)) return;
252 if (!TextToWindowPos(w0, h0, &w, &h)) return;
254 sf::begin_draw_bitmap begin(text_bitmap_target_);
256 sf::d2_dc_type dc(new sf::d2_dc(text_dc_target_,D2D1_DC_INITIALIZE_MODE_COPY));
257 c = ::SetTextColor(dc, PageToColor(3));
258 b = ::SetBkColor(dc, RGB(0x00, 0x00, 0x00));
259 ::BitBlt(dc, x,y,w,h, dc, x, y, DSTINVERT);
260 ::SetTextColor(dc, c);
263 THROW_IF_ERR(begin.end_draw());
267 c = ::SetTextColor(fTextDC, PageToColor(3));
268 b = ::SetBkColor(fTextDC, RGB(0x00, 0x00, 0x00));
269 ::BitBlt(fTextDC, x,y,w,h, fTextMaskDC, x, y, SRCCOPY);
270 ::SetTextColor(fTextDC, c);
271 ::SetBkColor(fTextDC, b);
273 ::BitBlt(fTextMaskDC, x,y,w,h, fTextMaskDC, x, y, DSTINVERT);
275 InvalidateRect(x,y,w,h);
279 CSTedScreenWin32::TextFill(int in_page, int in_x, int in_y, int in_w, int in_h, int in_linestyle)
286 if (!toWindowPos(in_x, in_y, &x, &y)) return;
287 if (!toWindowPos(in_w, in_h, &w, &h)) return;
289 ::SetRect(&r, x, y, x+w, y+h);
291 D2D1_RECT_F r1(D2D1::RectF(x,y,x+w,y+h));
292 D2D1_COLOR_F color = D2D1::ColorF(PageToColor(in_page));
293 ID2D1SolidColorBrushPtr color_brush;
295 text_bitmap_target_->CreateSolidColorBrush(color,&color_brush);
297 sf::begin_draw<ID2D1BitmapRenderTargetPtr> b(text_bitmap_target_);
298 D2D1_ANTIALIAS_MODE backup(text_bitmap_target_->GetAntialiasMode());
299 text_bitmap_target_->SetAntialiasMode(D2D1_ANTIALIAS_MODE_ALIASED);
302 text_bitmap_target_->FillRectangle(r1,color_brush);
303 //br = ::CreateSolidBrush(c);
306 text_bitmap_target_->PushAxisAlignedClip(r1,text_bitmap_target_->GetAntialiasMode());
307 text_bitmap_target_->Clear();
308 text_bitmap_target_->PopAxisAlignedClip();
309 //text_bitmap_target_->FillRectangle(r1,brush_text_clear_);
310 //br = fBrushTextClear;
313 text_bitmap_target_->SetAntialiasMode(backup);
314 THROW_IF_ERR(b.end_draw());
316 // if (in_linestyle!=0 && in_page!=0) {
317 // c = PageToColor(in_page);
318 // br = ::CreateSolidBrush(c);
321 // br = fBrushTextClear;
325 // ::FillRect(fTextDC, &r, br);
326 // ::FillRect(fTextMaskDC, &r, mbr);
328 // if (in_linestyle!=0 && in_page!=0)
329 //::DeleteObject(br);
337 CSTedScreenWin32::TextRasterCopy(int in_dst, int in_src, int in_line, int in_mode)
343 ly = fWindowHeight * (in_line/4 - 1) / fX68TextHeight;
344 if ((in_src==63*4) || (in_src==30*4)) {
349 sx = fWindowWidth * 2 / fX68TextWidth;
350 lx = fWindowWidth * 36 / fX68TextWidth;
352 sx = fWindowWidth * 58 / fX68TextWidth;
353 lx = fWindowWidth * 36 / fX68TextWidth;
357 sf::begin_draw_bitmap begin(text_bitmap_target_);
359 if (in_mode >= 0x8000) {
360 sf::d2_dc_type dc(new sf::d2_dc(text_dc_target_,D2D1_DC_INITIALIZE_MODE_COPY));
361 sy = fWindowHeight * ((in_src+1)/4) / fX68TextHeight;
362 dy = fWindowHeight * ((in_dst+1)/4) / fX68TextHeight;
363 ::BitBlt(dc, sx, dy-ly, lx, ly, dc, sx, sy-ly, SRCCOPY);
364 // ::BitBlt(fTextMaskDC, sx, dy-ly, lx, ly, fTextMaskDC, sx, sy-ly, SRCCOPY);
365 InvalidateRect(sx, dy-ly, lx, ly);
368 sy = fWindowHeight * in_dst/4 / fX68TextHeight;
369 dy = sy+fTextLineHeight;
370 ::SetRect(&r, sx, sy, sx+lx, dy);
371 D2D1_ANTIALIAS_MODE backup(text_bitmap_target_->GetAntialiasMode());
372 text_bitmap_target_->SetAntialiasMode(D2D1_ANTIALIAS_MODE_ALIASED);
374 text_bitmap_target_->FillRectangle(D2D1::RectF(sx,sy,sx+lx,dy),brush_text_clear_);
375 // ::FillRect(dc, &r, fBrushTextClear);
376 // ::FillRect(fTextMaskDC, &r, MASK_OFF);
377 text_bitmap_target_->SetAntialiasMode(backup);
380 sf::d2_dc_type dc(new sf::d2_dc(text_dc_target_,D2D1_DC_INITIALIZE_MODE_COPY));
381 sy = fWindowHeight * (in_src/4) / fX68TextHeight;
382 dy = fWindowHeight * (in_dst/4) / fX68TextHeight;
383 ::BitBlt(dc, sx, dy, lx, ly, dc, sx, sy, SRCCOPY);
384 // ::BitBlt(fTextMaskDC, sx, dy, lx, ly, fTextMaskDC, sx, sy, SRCCOPY);
385 InvalidateRect(sx, dy, lx, ly);
389 THROW_IF_ERR(begin.end_draw());
393 CSTedScreenWin32::TextScroll(int in_x0, int in_y0, int in_xs, int in_ys, int in_x1, int in_y1)
399 if (!TextToWindowPos(in_x0, in_y0, &x0, &d)) return;
400 if (!toWindowPos(in_x0, in_y0, &d, &y0)) return;
401 if (!TextToWindowPos(in_x1, in_y1, &x1, &d)) return;
402 if (!toWindowPos(in_x1, in_y1, &d, &y1)) return;
403 if (!TextToWindowPos(in_xs, in_ys, &w, &d)) return;
404 if (!toWindowPos(in_xs, in_ys, &d, &h)) return;
406 sf::begin_draw_bitmap begin(text_bitmap_target_);
408 sf::d2_dc_type dc(new sf::d2_dc(text_dc_target_,D2D1_DC_INITIALIZE_MODE_COPY));
409 ::BitBlt(dc, x1,y1,w,h, dc, x0, y0, SRCCOPY);
411 THROW_IF_ERR(begin.end_draw());
413 // ::BitBlt(fTextDC, x1, y1, w, h, fTextDC, x0, y0, SRCCOPY);
414 // ::BitBlt(fTextMaskDC, x1, y1, w, h, fTextMaskDC, x0, y0, SRCCOPY);
416 InvalidateRect(x1, y1, w, h);
420 CSTedScreenWin32::GraphicsBox(int in_x0, int in_y0, int in_x1, int in_y1, unsigned int in_color, unsigned int in_linestyle)
430 if (!toWindowPos(in_x0, in_y0, &sx, &sy)) return;
431 if (!toWindowPos(in_x1, in_y1, &ex, &ey)) return;
432 d = (in_y1 >= fX68WindowHeight) ? 1:0;
433 if (sx>ex) { x=ex; ex=sx; sx=x;}
434 if (sy>ey) { y=ey; ey=sy; sy=y;}
436 c = (in_linestyle!=0) ? SetGraphicsColor(in_color) : 0;
438 ID2D1SolidColorBrushPtr brush;
439 graphics_bitmap_target_[d]->CreateSolidColorBrush(D2D1::ColorF(c),&brush);
440 sf::begin_draw_bitmap begin(graphics_bitmap_target_[d]);
441 D2D1_ANTIALIAS_MODE backup(graphics_bitmap_target_[d]->GetAntialiasMode());
442 graphics_bitmap_target_[d]->SetAntialiasMode(D2D1_ANTIALIAS_MODE_ALIASED);
443 if (sx==ex || sy==ey) {
445 // pen = ::CreatePen(PS_SOLID, 1, c);
446 graphics_bitmap_target_[d]->DrawLine(D2D1::Point2F(sx,sy),D2D1::Point2F(ex,ey),brush);
451 //orig = (HPEN)::SelectObject(fGraphicsWindowDC[d], pen);
452 //::MoveToEx(fGraphicsWindowDC[d], sx, sy, NULL);
453 //::LineTo(fGraphicsWindowDC[d], ex, ey);
454 //::SelectObject(fGraphicsWindowDC[d], orig);
455 //::DeleteObject(pen);
458 graphics_bitmap_target_[d]->DrawRectangle(D2D1::RectF(sx,sy,ex,ey),brush);
459 //br = ::CreateSolidBrush(c);
461 ////::FrameRect(fGraphicsWindowDC[d], &r, br);
462 ////::DeleteObject(br);
465 graphics_bitmap_target_[d]->SetAntialiasMode(backup);
467 THROW_IF_ERR(begin.end_draw());
468 ::SetRect(&r, sx, sy, ex, ey);
473 CSTedScreenWin32::GraphicsPoint(int in_x, int in_y)
480 CSTedScreenWin32::GraphicsLine(int in_x0, int in_y0, int in_x1, int in_y1, int in_color, int in_linestyle)
488 if (!toWindowPos(in_x0, in_y0, &sx, &sy)) return;
489 if (!toWindowPos(in_x1, in_y1, &ex, &ey)) return;
490 d = (in_y1 >= fX68WindowHeight) ? 1:0;
491 if (sx>ex) { x=ex; ex=sx; sx=x;}
492 if (sy>ey) { y=ey; ey=sy; sy=y;}
494 c = (in_linestyle!=0) ? SetGraphicsColor(in_color) : 0;
496 ID2D1SolidColorBrushPtr brush;
497 graphics_bitmap_target_[d]->CreateSolidColorBrush(D2D1::ColorF(c),&brush);
500 sf::begin_draw_bitmap begin(graphics_bitmap_target_[d]);
501 D2D1_ANTIALIAS_MODE backup(graphics_bitmap_target_[d]->GetAntialiasMode());
502 graphics_bitmap_target_[d]->SetAntialiasMode(D2D1_ANTIALIAS_MODE_ALIASED);
503 graphics_bitmap_target_[d]->DrawLine(D2D1::Point2F(sx,sy),D2D1::Point2F(ex,ey),brush);
504 graphics_bitmap_target_[d]->SetAntialiasMode(backup);
506 THROW_IF_ERR(begin.end_draw());
508 //pen = ::CreatePen(PS_SOLID, 1, c);
510 // orig = (HPEN)::SelectObject(fGraphicsWindowDC[d], pen);
511 // ::MoveToEx(fGraphicsWindowDC[d], sx, sy, NULL);
512 // ::LineTo(fGraphicsWindowDC[d], ex, ey);
513 // ::SelectObject(fGraphicsWindowDC[d], orig);
514 // ::DeleteObject(pen);
516 //InvalidateRect(sx, sy, ex-sx, ey-sy);
520 CSTedScreenWin32::GraphicsFill(int in_x0, int in_y0, int in_x1, int in_y1, int in_color)
529 if (!toWindowPos(in_x0, in_y0, &sx, &sy)) return;
530 if (!toWindowPos(in_x1, in_y1, &ex, &ey)) return;
531 d = (in_y1 >= fX68WindowHeight) ? 1:0;
532 if (sx>ex) { x = ex; ex = sx; sx = x;}
533 if (sy>ey) { y = ey; ey = sy; sy = y;}
535 c = SetGraphicsColor(in_color);
537 ::SetRect(&r, sx, sy, ex, ey);
538 ID2D1SolidColorBrushPtr brush;
540 graphics_bitmap_target_[d]->CreateSolidColorBrush(D2D1::ColorF(c),&brush);
542 sf::begin_draw_bitmap begin(graphics_bitmap_target_[d]);
543 D2D1_ANTIALIAS_MODE backup(graphics_bitmap_target_[d]->GetAntialiasMode());
544 graphics_bitmap_target_[d]->SetAntialiasMode(D2D1_ANTIALIAS_MODE_ALIASED);
545 graphics_bitmap_target_[d]->FillRectangle(D2D1::RectF(sx,sy,ex,ey),brush);
546 graphics_bitmap_target_[d]->SetAntialiasMode(backup);
547 THROW_IF_ERR(begin.end_draw());
549 // br = ::CreateSolidBrush(c);
551 // ::FillRect(fGraphicsWindowDC[d], &r, br);
552 //::DeleteObject(br);
559 CSTedScreenWin32::CopyTextToGraphics(int in_editscreen)
567 if (in_editscreen==0) {
574 if (!TextToWindowPos(xt, yt, &x0, &y0)) return;
575 if (!TextToWindowPos(xl, (yt+yl), &x1, &y1)) return;
577 //c = ::SetTextColor(fGraphicsWindowDC[1], RGB(0x00, 0x00, 0x00));
578 //b = ::SetBkColor(fGraphicsWindowDC[1], RGB(0xff, 0xff, 0xff));
580 //::BitBlt(fGraphicsWindowDC[1], x0, y0, x1, y1-y0, fTextMaskDC, x0, y0, SRCPAINT);
581 //::BitBlt(fGraphicsWindowDC[1], x0, y0, x1, y1-y0, fTextDC, x0, y0, SRCAND);
583 //::SetTextColor(fGraphicsWindowDC[1], c);
584 //::SetBkColor(fGraphicsWindowDC[1], b);
586 InvalidateRect(x0, y0, x1, y1-y0);
590 CSTedScreenWin32::CopyTextToGraphics2(int in_editscreen)
592 //int x0, y0, x1, y1;
593 //int xt, xl, yt, yl;
598 //if (in_editscreen==0) {
605 //if (!TextToWindowPos(xt, yt, &x0, &y0)) return;
606 //if (!TextToWindowPos(xl, (yt+yl), &x1, &y1)) return;
608 //c = ::SetTextColor(fGraphicsWindowDC[1], RGB(0x00, 0x00, 0x00));
609 //b = ::SetBkColor(fGraphicsWindowDC[1], RGB(0xff, 0xff, 0xff));
611 //::BitBlt(fGraphicsWindowDC[1], x0, y0, x1, y1-y0, fTextMaskDC, x0, y0, SRCPAINT);
612 //::BitBlt(fGraphicsWindowDC[1], x0, y0, x1, y1-y0, fTextDC, x0, y0, SRCAND);
614 //::SetTextColor(fGraphicsWindowDC[1], c);
615 //::SetBkColor(fGraphicsWindowDC[1], b);
617 //InvalidateRect(x0, y0, x1, y1-y0);
621 CSTedScreenWin32::GraphicsHome(int in_home)
623 if (in_home!=0 && in_home!=1) in_home = 0;
624 fCurrentGraphics = in_home;
625 InvalidateRect(NULL);
629 CSTedScreenWin32::ClsAll(void)
632 ::SetRect(&r, 0, 0, fWindowWidth, fWindowHeight);
633 sf::begin_draw_bitmap begin(text_bitmap_target_);
634 text_bitmap_target_->Clear(D2D1::ColorF(0,0));
635 THROW_IF_ERR(begin.end_draw());
637 // ::FillRect(fTextDC, &r, fBrushTextClear);
638 // ::FillRect(fTextMaskDC, &r, MASK_OFF);
643 CSTedScreenWin32::GraphicsClear(void)
646 ::SetRect(&r, 0, 0, fWindowWidth, fWindowHeight);
647 sf::begin_draw_bitmap begin(graphics_bitmap_target_[fCurrentGraphics]);
648 graphics_bitmap_target_[fCurrentGraphics]->Clear();
649 THROW_IF_ERR(begin.end_draw());
650 //::FillRect(fGraphicsWindowDC[fCurrentGraphics], &r, fBrushClear);