Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added DrawCircle and DrawLine #24

Merged
merged 1 commit into from
Apr 7, 2015
Merged

Added DrawCircle and DrawLine #24

merged 1 commit into from
Apr 7, 2015

Conversation

srandoux
Copy link
Contributor

@srandoux srandoux commented Apr 3, 2015

I did the changes you mentioned.

Regards,

-Sébastien

@hzeller
Copy link
Owner

hzeller commented Apr 3, 2015

Thanks! Much better. Only a few comments above and we are ready to merge.

@@ -27,4 +28,70 @@ int DrawText(Canvas *c, const Font &font,
}
return x - start_x;
}


void DrawCircle(Canvas *c, int32_t x0, int32_t y0, int32_t radius, uint8_t red, uint8_t green, uint8_t blue){
Copy link
Owner

Choose a reason for hiding this comment

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

At the end of this method header, add a space before the curly brace
...blue) {

@hzeller
Copy link
Owner

hzeller commented Apr 3, 2015

The indentation looks like it is 4 spaces, but this code usually uses 2 spaces. Can you look at that as well ?

api updated for color
@srandoux
Copy link
Contributor Author

srandoux commented Apr 6, 2015

I did the updates

@hzeller
Copy link
Owner

hzeller commented Apr 6, 2015

Only two little remarks. Will merge this evening (California time).

@srandoux
Copy link
Contributor Author

srandoux commented Apr 6, 2015

ok, I have some code for an analog clock and a plasma. I did not add it to your main demo code because it is a big file and i prefered to split it. I committed in on a repo on my github, you can have a look if you want. https://github.com/srandoux/ledmatrix

hzeller added a commit that referenced this pull request Apr 7, 2015
Added DrawCircle and DrawLine contributed by @srandoux
@hzeller hzeller merged commit 44a1c0e into hzeller:master Apr 7, 2015
@hzeller
Copy link
Owner

hzeller commented Apr 7, 2015

So the clock and plasma example sound interesting (I didn't compile them, but had a quick look). If you want, you could integrate these as another demo in the demo-main.cc.

This file is getting a bit big, and maybe I am separating these at some point. But having everything for demos in one file is probably as well useful for people that want to get started with copy/paste programming.

@srandoux
Copy link
Contributor Author

srandoux commented Apr 8, 2015

Hi, ok I'll do that. maybe not this week but soon. I need to work on antialiased version of the line though.
(the algorithm I know uses alpha channels...). By sorry for the dx==dy==0 case in the line, I forgot It and did not see it happening while testing.

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