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

Dotted/dashed line (patch) #338

Open
GoogleCodeExporter opened this issue Jul 30, 2015 · 1 comment
Open

Dotted/dashed line (patch) #338

GoogleCodeExporter opened this issue Jul 30, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Hi all,

I find u8lib a great tool (use arduino + pcd8544 nokia display), but one 
feature, important for me, is missing. Normal lines (x1,y1,x2,y2) are drawn 
solid. I needed drawing dotted and dashed lines. I took a look into the code 
and added this:

void U8GLIB::u8g_DrawDLine(u8g_t *u8g, u8g_uint_t x1, u8g_uint_t y1, u8g_uint_t 
x2, u8g_uint_t y2, u8g_int_t d);

Idea is simple: d parameters describes how many points in the line are 
plotted/missed. So if "d" equals:
0 - ordinary solid line
1 - dotted line (odd points are printed)
2+ - dashed line ("d" points drawn then "d" points omitted)
-d - dash size is the same as for "d", but "invisible" pointsare first

Is is not a big contribution but I hope someone will find it useful. The file 
attached is a patch against v1.17 (arduino lib). 

Original issue reported on code.google.com by [email protected] on 28 Apr 2015 at 10:12

Attachments:

@GoogleCodeExporter
Copy link
Author

Thanks for the contribution

Original comment by [email protected] on 1 May 2015 at 7:13

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

No branches or pull requests

1 participant