mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-04 22:18:29 +02:00
Update BeOS test code per the cairo_format_t -> cairo_content_t changes.
This commit is contained in:
parent
2afe78c0c2
commit
9fe4934635
3 changed files with 15 additions and 6 deletions
|
|
@ -1,3 +1,12 @@
|
|||
2006-01-21 Christian Biesinger <cbiesinger@web.de>
|
||||
|
||||
* test/cairo-test-beos.cpp: (create_beos_surface),
|
||||
(create_beos_bitmap_surface):
|
||||
* test/cairo-test-beos.h:
|
||||
|
||||
Update BeOS test code per the cairo_format_t -> cairo_content_t
|
||||
changes.
|
||||
|
||||
2006-01-21 Christian Biesinger <cbiesinger@web.de>
|
||||
|
||||
* pixman/src/fbpict.c: (detectCPUFeatures):
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ struct beos_test_closure
|
|||
|
||||
// Test a real window
|
||||
cairo_surface_t *
|
||||
create_beos_surface (cairo_test_t* test, cairo_format_t format, void **closure)
|
||||
create_beos_surface (cairo_test_t* test, cairo_content_t content, void **closure)
|
||||
{
|
||||
float right = test->width ? test->width - 1 : 0;
|
||||
float bottom = test->height ? test->height - 1 : 0;
|
||||
|
|
@ -200,12 +200,12 @@ cleanup_beos (void* closure)
|
|||
|
||||
// Test a bitmap
|
||||
cairo_surface_t *
|
||||
create_beos_bitmap_surface (cairo_test_t* test, cairo_format_t format,
|
||||
create_beos_bitmap_surface (cairo_test_t* test, cairo_content_t content,
|
||||
void **closure)
|
||||
{
|
||||
BRect rect(0.0, 0.0, test->width - 1, test->height - 1);
|
||||
color_space beosformat = (format == CAIRO_FORMAT_RGB24) ? B_RGB32
|
||||
: B_RGBA32;
|
||||
color_space beosformat = (content == CAIRO_CONTENT_COLOR_ALPHA) ? B_RGBA32
|
||||
: B_RGB32;
|
||||
BBitmap* bmp = new BBitmap(rect, beosformat, true);
|
||||
BView* view = new BView(rect, "Cairo test view", B_FOLLOW_ALL_SIDES, 0);
|
||||
bmp->AddChild(view);
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@
|
|||
CAIRO_BEGIN_DECLS
|
||||
|
||||
extern cairo_surface_t *
|
||||
create_beos_surface (cairo_test_t* test, cairo_format_t format,
|
||||
create_beos_surface (cairo_test_t* test, cairo_content_t content,
|
||||
void **closure);
|
||||
|
||||
extern void
|
||||
cleanup_beos (void* closure);
|
||||
|
||||
extern cairo_surface_t *
|
||||
create_beos_bitmap_surface (cairo_test_t* test, cairo_format_t format,
|
||||
create_beos_bitmap_surface (cairo_test_t* test, cairo_content_t content,
|
||||
void **closure);
|
||||
|
||||
extern void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue