Skip to content

Commit

Permalink
draw: add doc strings and note to DrawImage.image_2d(...)
Browse files Browse the repository at this point in the history
  • Loading branch information
larpon committed Sep 28, 2023
1 parent 87a03aa commit 1667141
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/draw2d.image.b.v
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ pub fn (mut di DrawImage) end() {
// gl.draw()
}

// image_2d returns an initialized Draw2DImage struct.
// NOTE `image` is passed by reference because building with `-gc none` otherwise leaks.
pub fn (di DrawImage) image_2d(image &Image) Draw2DImage {

return Draw2DImage{
factor: di.factor
width: image.width
Expand Down

0 comments on commit 1667141

Please sign in to comment.