-(defmethod initialize-instance ((surface image-surface)
- &key width height stride format data)
- (setf
- (slot-value surface 'location)
- (if (not data)
- (%image-surface-create format width height)
- (%image-surface-create-for-data data format width height
- (or
- stride
- (let ((element-size (cdr (assoc format '((:argb32 . 4) (:rgb24 . 4) (:a8 . 1) (:a1 1/8))))))
- (ceiling (* width element-size)))))))
- (call-next-method))
+(defmethod allocate-foreign ((surface image-surface)
+ &key width height stride format data)
+ (if (not data)
+ (%image-surface-create format width height)
+ (%image-surface-create-for-data data format width height
+ (or
+ stride
+ (let ((element-size (cdr (assoc format '((:argb32 . 4) (:rgb24 . 4) (:a8 . 1) (:a1 1/8))))))
+ (ceiling (* width element-size)))))))