zoomedit: Bug in der Grid-Funktion gefixt
This commit is contained in:
parent
8dc800c372
commit
d21f73c498
1 changed files with 4 additions and 3 deletions
7
draw.c
7
draw.c
|
@ -33,7 +33,7 @@ static void drawGrid(cairo_t *cr, const RECTANGLE *rect) {
|
||||||
|
|
||||||
if(step > 0.005) {
|
if(step > 0.005) {
|
||||||
if(step > 0.5)
|
if(step > 0.5)
|
||||||
string = g_strdup_printf("%i", (int)d);
|
string = g_strdup_printf("%i", (int)rint(d));
|
||||||
else
|
else
|
||||||
string = g_strdup_printf("%.*f", -(int)floor(log10(step*1.1)), d+step/10);
|
string = g_strdup_printf("%.*f", -(int)floor(log10(step*1.1)), d+step/10);
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ static void drawGrid(cairo_t *cr, const RECTANGLE *rect) {
|
||||||
|
|
||||||
if(step > 0.005) {
|
if(step > 0.005) {
|
||||||
if(step > 0.5)
|
if(step > 0.5)
|
||||||
string = g_strdup_printf("%i", (int)d);
|
string = g_strdup_printf("%i", (int)rint(d));
|
||||||
else
|
else
|
||||||
string = g_strdup_printf("%.*f", -(int)floor(log10(step*1.1)), d+step/10);
|
string = g_strdup_printf("%.*f", -(int)floor(log10(step*1.1)), d+step/10);
|
||||||
|
|
||||||
|
@ -146,9 +146,10 @@ gboolean drawTopView(GtkWidget *widget, GdkEventExpose *event, gpointer data) {
|
||||||
drawGrid(cr, &rect);
|
drawGrid(cr, &rect);
|
||||||
|
|
||||||
for(i = 0; i < getLevel()->nRooms; i++) {
|
for(i = 0; i < getLevel()->nRooms; i++) {
|
||||||
if(&getLevel()->rooms[i] != getActiveRoom())
|
if(&getLevel()->rooms[i] != getActiveRoom()) {
|
||||||
polygon2path(cr, &getLevel()->rooms[i].polygon, &rect, TRUE);
|
polygon2path(cr, &getLevel()->rooms[i].polygon, &rect, TRUE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cairo_set_source_rgba(cr, 0.0, 0.7, 1.0, 0.3);
|
cairo_set_source_rgba(cr, 0.0, 0.7, 1.0, 0.3);
|
||||||
cairo_fill_preserve(cr);
|
cairo_fill_preserve(cr);
|
||||||
|
|
Reference in a new issue