Skip to content
Snippets Groups Projects
Commit 20c42654 authored by siflfran's avatar siflfran
Browse files

Kreisbla angefangen

parent dc5253f6
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ outThickness 1
fancyHands 1
outlinedHands 0
neonHands 0
neonHands 1
#execProg "xterm +sb -bg "#303030" -fg "#20b2aa" -geometry 80x50 -T top -n top -e top &"
withdrawn 0
......@@ -43,6 +43,6 @@ title astime
twentyfourHour 1
sunriset 1
sunrisetDay orange
sunrisetNight black
sunrisetNight grey20
latitude 11.05
longitude 49.6972222
......@@ -78,3 +78,25 @@ int FillCenteredArc(Display *display, Drawable d, GC gc,
return XFillArc(display, d, gc,
x - width, y - height, 2 * width, 2 * height, angle1, angle2);
}
int DrawTopCircle(Display *display, Drawable d, GC gc,
int x, int y, unsigned int radius, int angle)
{
short coord_x, coord_y, center_x, center_y;
double r_angle;
r_angle = (angle / 64) * (M_PI / 180.0);
coord_x = x;
coord_y = y;
center_x = coord_x * cos(.5 * M_PI - r_angle);
center_y = coord_y * sin(.5 * M_PI - r_angle);
RotateCoordinates(&coord_x, &coord_y, center_x, center_y, angle);
coord_x -= radius;
return XDrawArc(display, d, gc,
coord_x, coord_y, 2 * radius, 2 * radius, 0, 360 * 64);
}
int FillTopCircle(Display *display, Drawable d, GC gc,
int x, int y, unsigned int radius, int angle)
{
return XFillArc(display, d, gc,
x - radius, y, 2 * radius, 2 * radius, 0, 360 * 64);
}
......@@ -18,3 +18,7 @@ int DrawCenteredArc(Display *display, Drawable d, GC gc,
int FillCenteredArc(Display *display, Drawable d, GC gc,
int x, int y, unsigned int width, unsigned int height,
int angle1, int angle2);
int DrawTopCircle(Display *display, Drawable d, GC gc,
int x, int y, unsigned int radius, int angle);
int FillTopCircle(Display *display, Drawable d, GC gc,
int x, int y, unsigned int radius, int angle);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment