Changeset 18941 in project


Ignore:
Timestamp:
07/23/10 15:52:09 (10 years ago)
Author:
Moritz Heidkamp
Message:

imlib2: copy r18940 to the 0.12 tag *ahem*

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/imlib2/tags/0.12/imlib2.scm

    r18939 r18941  
    3737
    3838(module imlib2
    39   (image-create image-destroy image-clone image-blend image-load image-save
     39  (image-create image-destroy image-clone image-load image-save
    4040   image? image-format-set! image-format image-width image-height
    4141   image-filename image-alpha? image-alpha-set!
     
    4545   image-orientate image-orientate! image-sharpen image-sharpen!
    4646   image-blur image-blur! image-tile image-tile! image-tile-horizontal
    47    image-tile-horizontal! image-tile-vertical image-tile-vertical!
     47   image-tile-horizontal! image-tile-vertical image-tile-vertical!
     48   image-blend image-blend!
    4849   image-crop image-scale
    4950   image-crop&scale image-pixel/rgba image-pixel/hsva image-pixel/hlsa
     
    259260(define/clone image-tile image-tile!)
    260261
     262(define (image-blend! img src-img #!key
     263                      (merge-alpha #t)
     264                      (src-x 0)
     265                      (src-y 0)
     266                      (src-width (image-width src-img))
     267                      (src-height (image-height src-img))
     268                      (dest-x 0)
     269                      (dest-y 0)
     270                      (dest-width (image-width src-img))
     271                      (dest-height (image-height src-img)))
     272 
     273  (for-each (cut assert-image <> 'image-blend merge-alpha
     274                 src-x src-y src-width src-height
     275                 dest-x dest-y dest-width dest-height)
     276            (list img src-img))
     277
     278  (imlib-context-set-image (image-ptr img))
     279
     280  ((foreign-lambda void imlib_blend_image_onto_image image bool int int int int int int int int)
     281   (image-ptr src-img) merge-alpha src-x src-y
     282   src-width src-height dest-x
     283   dest-y dest-width dest-height))
     284
     285(define/clone image-blend image-blend!)
     286
    261287;; imlib_image_get_data
    262288;; imlib_image_get_data_for_reading_only
     
    298324  (or ((foreign-lambda image imlib_clone_image))
    299325      (imlib-err 'imlib-clone-image "Could not clone image")))
    300 
    301 (define (image-blend img src-img #!key
    302                      (merge-alpha #t)
    303                      (src-x 0)
    304                      (src-y 0)
    305                      (src-width (image-width src-img))
    306                      (src-height (image-height src-img))
    307                      (dest-x 0)
    308                      (dest-y 0)
    309                      (dest-width (image-width src-img))
    310                      (dest-height (image-height src-img)))
    311  
    312   (for-each (cut assert-image <> 'image-blend merge-alpha
    313                  src-x src-y src-width src-height
    314                  dest-x dest-y dest-width dest-height)
    315             (list img src-img))
    316 
    317   (imlib-context-set-image (image-ptr img))
    318 
    319   ((foreign-lambda void imlib_blend_image_onto_image image bool int int int int int int int int)
    320    (image-ptr src-img) merge-alpha src-x src-y
    321    src-width src-height dest-x
    322    dest-y dest-width dest-height))
    323326
    324327(define (check-coords loc img x y)
Note: See TracChangeset for help on using the changeset viewer.