github.com/HaHadaxigua/yaegi@v1.0.1/stdlib/go1_17_image_draw.go (about)

     1  // Code generated by 'yaegi extract image/draw'. DO NOT EDIT.
     2  
     3  //go:build go1.17
     4  // +build go1.17
     5  
     6  package stdlib
     7  
     8  import (
     9  	"image"
    10  	"image/color"
    11  	"image/draw"
    12  	"reflect"
    13  )
    14  
    15  func init() {
    16  	Symbols["image/draw/draw"] = map[string]reflect.Value{
    17  		// function, constant and variable definitions
    18  		"Draw":           reflect.ValueOf(draw.Draw),
    19  		"DrawMask":       reflect.ValueOf(draw.DrawMask),
    20  		"FloydSteinberg": reflect.ValueOf(&draw.FloydSteinberg).Elem(),
    21  		"Over":           reflect.ValueOf(draw.Over),
    22  		"Src":            reflect.ValueOf(draw.Src),
    23  
    24  		// type definitions
    25  		"Drawer":      reflect.ValueOf((*draw.Drawer)(nil)),
    26  		"Image":       reflect.ValueOf((*draw.Image)(nil)),
    27  		"Op":          reflect.ValueOf((*draw.Op)(nil)),
    28  		"Quantizer":   reflect.ValueOf((*draw.Quantizer)(nil)),
    29  		"RGBA64Image": reflect.ValueOf((*draw.RGBA64Image)(nil)),
    30  
    31  		// interface wrapper definitions
    32  		"_Drawer":      reflect.ValueOf((*_image_draw_Drawer)(nil)),
    33  		"_Image":       reflect.ValueOf((*_image_draw_Image)(nil)),
    34  		"_Quantizer":   reflect.ValueOf((*_image_draw_Quantizer)(nil)),
    35  		"_RGBA64Image": reflect.ValueOf((*_image_draw_RGBA64Image)(nil)),
    36  	}
    37  }
    38  
    39  // _image_draw_Drawer is an interface wrapper for Drawer type
    40  type _image_draw_Drawer struct {
    41  	IValue interface{}
    42  	WDraw  func(dst draw.Image, r image.Rectangle, src image.Image, sp image.Point)
    43  }
    44  
    45  func (W _image_draw_Drawer) Draw(dst draw.Image, r image.Rectangle, src image.Image, sp image.Point) {
    46  	W.WDraw(dst, r, src, sp)
    47  }
    48  
    49  // _image_draw_Image is an interface wrapper for Image type
    50  type _image_draw_Image struct {
    51  	IValue      interface{}
    52  	WAt         func(x int, y int) color.Color
    53  	WBounds     func() image.Rectangle
    54  	WColorModel func() color.Model
    55  	WSet        func(x int, y int, c color.Color)
    56  }
    57  
    58  func (W _image_draw_Image) At(x int, y int) color.Color {
    59  	return W.WAt(x, y)
    60  }
    61  func (W _image_draw_Image) Bounds() image.Rectangle {
    62  	return W.WBounds()
    63  }
    64  func (W _image_draw_Image) ColorModel() color.Model {
    65  	return W.WColorModel()
    66  }
    67  func (W _image_draw_Image) Set(x int, y int, c color.Color) {
    68  	W.WSet(x, y, c)
    69  }
    70  
    71  // _image_draw_Quantizer is an interface wrapper for Quantizer type
    72  type _image_draw_Quantizer struct {
    73  	IValue    interface{}
    74  	WQuantize func(p color.Palette, m image.Image) color.Palette
    75  }
    76  
    77  func (W _image_draw_Quantizer) Quantize(p color.Palette, m image.Image) color.Palette {
    78  	return W.WQuantize(p, m)
    79  }
    80  
    81  // _image_draw_RGBA64Image is an interface wrapper for RGBA64Image type
    82  type _image_draw_RGBA64Image struct {
    83  	IValue      interface{}
    84  	WAt         func(x int, y int) color.Color
    85  	WBounds     func() image.Rectangle
    86  	WColorModel func() color.Model
    87  	WRGBA64At   func(x int, y int) color.RGBA64
    88  	WSet        func(x int, y int, c color.Color)
    89  	WSetRGBA64  func(x int, y int, c color.RGBA64)
    90  }
    91  
    92  func (W _image_draw_RGBA64Image) At(x int, y int) color.Color {
    93  	return W.WAt(x, y)
    94  }
    95  func (W _image_draw_RGBA64Image) Bounds() image.Rectangle {
    96  	return W.WBounds()
    97  }
    98  func (W _image_draw_RGBA64Image) ColorModel() color.Model {
    99  	return W.WColorModel()
   100  }
   101  func (W _image_draw_RGBA64Image) RGBA64At(x int, y int) color.RGBA64 {
   102  	return W.WRGBA64At(x, y)
   103  }
   104  func (W _image_draw_RGBA64Image) Set(x int, y int, c color.Color) {
   105  	W.WSet(x, y, c)
   106  }
   107  func (W _image_draw_RGBA64Image) SetRGBA64(x int, y int, c color.RGBA64) {
   108  	W.WSetRGBA64(x, y, c)
   109  }