Lines Matching refs:view

96 	virtual void Draw(BView* view, BRect updateRect)
98 view->DrawString("Rects", BPoint(20, 30));
100 view->SetDrawingMode(B_OP_ALPHA);
101 view->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
103 BRect rect(view->Bounds());
114 view->SetTransform(transform);
116 view->SetHighColor(51, 151, 255, 20);
117 view->FillRect(rect);
119 view->SetHighColor(51, 255, 151, 180);
120 view->DrawString("Rect", center);
137 virtual void Draw(BView* view, BRect updateRect)
139 BRect rect(view->Bounds());
142 view->SetHighColor(255, 0, 0);
143 view->FillRect(rect);
144 view->SetHighColor(0, 0, 0);
145 view->DrawString("Failed to load the bitmap.", BPoint(20, 20));
159 view->BeginPicture(&picture);
160 view->SetDrawingMode(B_OP_ALPHA);
161 view->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE);
163 view->GetFont(&font);
165 view->SetFont(&font);
166 view->SetHighColor(0, 0, 0, 80);
167 view->FillRect(view->Bounds());
168 view->SetHighColor(0, 0, 0, 255);
169 view->DrawString("CLIPPING", BPoint(0, center.y + 35));
170 view->EndPicture();
172 view->ClipToPicture(&picture);
176 view->SetTransform(transform);
178 view->DrawBitmap(fBitmap, fBitmap->Bounds(), rect);
194 virtual void Draw(BView* view, BRect updateRect)
196 BRect rect(view->Bounds());
204 view->SetTransform(transform);
217 view->FillRoundRect(rect, radius, radius, gradient);
229 Test("Nested view states")
233 virtual void Draw(BView* view, BRect updateRect)
237 view->SetTransform(transform);
250 view->FillRoundRect(rect, 20, 20, gradient);
252 view->PushState();
254 view->StrokeRoundRect(rect, 20, 20);
257 view->SetTransform(transform);
259 view->SetDrawingMode(B_OP_ALPHA);
260 view->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE);
261 view->SetHighColor(0, 0, 255, 120);
262 view->FillRoundRect(rect, 20, 20);
264 view->PopState();
280 virtual void Draw(BView* view, BRect updateRect)
283 view->SetHighColor(ui_color(B_FAILURE_COLOR));
284 view->FillRect(r);
288 view->SetTransform(transform);
291 // of the view bounds (for example because of scrolling).
292 view->SetHighColor(ui_color(B_SUCCESS_COLOR));
293 view->FillRect(r);
309 virtual void Draw(BView* view, BRect updateRect)
312 view->GetFont(&font);
314 view->SetFont(&font);
316 float width = view->Bounds().Width();
322 view->SetTransform(transform);
329 float size = view->StringWidth(str);
331 view->SetHighColor(ui_color(B_SUCCESS_COLOR));
332 view->FillRect(r);
335 view->SetHighColor(0, 0, 0, 255);
336 view->DrawString(str, BPoint(-width, 70));
347 view->SetHighColor(ui_color(B_SUCCESS_COLOR));
350 view->FillRect(r);
353 view->SetHighColor(0, 0, 0, 255);
354 view->DrawString(str, offsets, strlen(str));
371 virtual void Draw(BView* view, BRect updateRect)
373 BRect rect(view->Bounds());
376 view->SetHighColor(255, 0, 0);
377 view->FillRect(rect);
378 view->SetHighColor(0, 0, 0);
379 view->DrawString("Failed to load the bitmap.", BPoint(20, 20));
385 view->SetHighColor(ui_color(B_FAILURE_COLOR));
386 view->FillRect(rect);
389 // bitmap should be drawn at the view origin. It will then exactly
395 view->SetTransform(transform);
397 view->DrawBitmap(fBitmap, fBitmap->Bounds(), rect);
413 virtual void Draw(BView* view, BRect updateRect)
416 view->SetHighColor(ui_color(B_SUCCESS_COLOR));
417 view->StrokeRect(rect);
421 view->SetTransform(transform);
425 view->SetHighColor(ui_color(B_FAILURE_COLOR));
426 view->StrokeRect(rect);