Skip to content

Create draw package with fill rectangle function#87

Open
vlamai wants to merge 1 commit into
anthonynsimon:masterfrom
vlamai:draw
Open

Create draw package with fill rectangle function#87
vlamai wants to merge 1 commit into
anthonynsimon:masterfrom
vlamai:draw

Conversation

@vlamai

@vlamai vlamai commented Feb 12, 2021

Copy link
Copy Markdown

Not sure that done all things right.
#87 commit to this issue
TODO:

  • add Border Rectangle without fill

@vlamai vlamai closed this Feb 13, 2021
@vlamai vlamai reopened this Feb 13, 2021

@Nv7-GitHub Nv7-GitHub left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a draw package would be nice! I could also add in filled circle support, and unfilled rectangle support!

Comment thread draw/rectangle.go
}
}

func FillRectangle(img image.Image, r Rectangle) *image.RGBA {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just use FillRectangle(img image.Image, r image.Rect, color color.Color)

Comment thread README.md
### Rectangle
result := draw.FillRectangle(img, NewRectangle(0, 0, 150, 250, color.White))

![example](assets/img/draw_fill_rect.jpg)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think something like rectfilled.jpg would fit in better with the rest of the image names

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants