Commit dc2c0db1aad490a1a71d22bb523706b05d9751f4
1 parent
496f55ee
Exists in
master
and in
1 other branch
Implementando conversão do buffer de terminal para HTML
Showing
1 changed file
with
19 additions
and
1 deletions
Show diff stats
draw.c
| ... | ... | @@ -28,6 +28,7 @@ |
| 28 | 28 | */ |
| 29 | 29 | |
| 30 | 30 | #include <gtk/gtk.h> |
| 31 | + #include <math.h> | |
| 31 | 32 | #include <pw3270.h> |
| 32 | 33 | #include <lib3270.h> |
| 33 | 34 | #include <lib3270/session.h> |
| ... | ... | @@ -131,7 +132,24 @@ void v3270_draw_char(cairo_t *cr, unsigned char chr, unsigned short attr, H3270 |
| 131 | 132 | gdk_cairo_set_source_color(cr,fg); |
| 132 | 133 | |
| 133 | 134 | // Draw char |
| 134 | - if(attr & LIB3270_ATTR_CG) | |
| 135 | + if( (attr & LIB3270_ATTR_MARKER) && lib3270_get_toggle(session,LIB3270_TOGGLE_VIEW_FIELD) ) | |
| 136 | + { | |
| 137 | + double sz = (double) rect->width; | |
| 138 | + if(rect->height < rect->width) | |
| 139 | + sz = (double) rect->height; | |
| 140 | + | |
| 141 | + cairo_save(cr); | |
| 142 | + | |
| 143 | + sz /= 10; | |
| 144 | + | |
| 145 | + cairo_translate(cr, rect->x + (rect->width / 2), rect->y + (rect->height / 2)); | |
| 146 | + cairo_scale(cr, sz, sz); | |
| 147 | + cairo_arc(cr, 0., 0., 1., 0., 2 * M_PI); | |
| 148 | + | |
| 149 | + | |
| 150 | + cairo_restore(cr); | |
| 151 | + } | |
| 152 | + else if(attr & LIB3270_ATTR_CG) | |
| 135 | 153 | { |
| 136 | 154 | switch(chr) |
| 137 | 155 | { | ... | ... |