racket/draw: fix ok?
result for too-large bitmap creation
Use cairo_surface_status() to check whether creation succeeded.
This commit is contained in:
parent
f02bfbd11e
commit
ce4f41bc72
|
@ -201,6 +201,8 @@
|
|||
(max (*i scale h) 1))])
|
||||
(cairo_surface_flush s)
|
||||
(cond
|
||||
[(not (zero? (cairo_surface_status s)))
|
||||
#f]
|
||||
[(cairo_image_surface_get_data s)
|
||||
(cond
|
||||
[b&w?
|
||||
|
|
|
@ -109,6 +109,8 @@
|
|||
|
||||
(define-cairo cairo_get_target (_cfun _cairo_t -> _cairo_surface_t)) ;; not an allocator
|
||||
|
||||
(define-cairo cairo_surface_status (_cfun _cairo_surface_t -> _int))
|
||||
|
||||
(define-cairo cairo_surface_get_type (_cfun _cairo_surface_t -> _int))
|
||||
|
||||
;; Context
|
||||
|
|
Loading…
Reference in New Issue
Block a user