@@ -552,10 +552,10 @@ static void gr_string_old(float sx,
552552 render_mat.set_blend_mode (ALPHA_BLEND_ALPHA_BLEND_ALPHA);
553553 render_mat.set_depth_mode (ZBUFFER_TYPE_NONE);
554554 render_mat.set_texture_map (TM_BASE_TYPE, fontData->bitmap_id );
555- render_mat.set_color (gr_screen. current_color .red ,
556- gr_screen. current_color .green ,
557- gr_screen. current_color .blue ,
558- gr_screen. current_color .alpha );
555+ render_mat.set_color (GR_CURRENT_COLOR .red ,
556+ GR_CURRENT_COLOR .green ,
557+ GR_CURRENT_COLOR .blue ,
558+ GR_CURRENT_COLOR .alpha );
559559 render_mat.set_cull_mode (false );
560560 render_mat.set_texture_type (material::TEX_TYPE_AABITMAP);
561561
@@ -749,7 +749,7 @@ graphics::paths::PathRenderer* beginDrawing(int resize_mode) {
749749
750750 path->beginPath ();
751751
752- path->setStrokeWidth (gr_screen. line_width );
752+ path->setStrokeWidth (GR_CURRENT_LINE_WIDTH );
753753
754754 return path;
755755}
@@ -829,7 +829,7 @@ void gr_string(float sx, float sy, const char* s, int resize_mode, float scaleMu
829829
830830 bool twoPassRequired = false ;
831831
832- path->setFillColor (&gr_screen. current_color );
832+ path->setFillColor (&GR_CURRENT_COLOR );
833833
834834 // Do a two pass algorithm, first render text using NanoVG, then render old characters
835835 for (int pass = 0 ; pass < 2 ; ++pass) {
@@ -940,13 +940,13 @@ static void gr_line(float x1, float y1, float x2, float y2, int resize_mode) {
940940 if ((x1 == x2) && (y1 == y2)) {
941941 path->circle (x1, y1, 1.5 );
942942
943- path->setFillColor (&gr_screen. current_color );
943+ path->setFillColor (&GR_CURRENT_COLOR );
944944 path->fill ();
945945 } else {
946946 path->moveTo (x1, y1);
947947 path->lineTo (x2, y2);
948948
949- path->setStrokeColor (&gr_screen. current_color );
949+ path->setStrokeColor (&GR_CURRENT_COLOR );
950950 path->stroke ();
951951 }
952952
@@ -980,18 +980,18 @@ void gr_gradient(int x1, int y1, int x2, int y2, int resize_mode) {
980980 return ;
981981 }
982982
983- if (!gr_screen. current_color .is_alphacolor ) {
983+ if (!GR_CURRENT_COLOR .is_alphacolor ) {
984984 gr_line (x1, y1, x2, y2, resize_mode);
985985 return ;
986986 }
987987
988988 auto path = beginDrawing (resize_mode);
989989
990- color endColor = gr_screen. current_color ;
990+ color endColor = GR_CURRENT_COLOR ;
991991 endColor.alpha = 0 ;
992992
993993 auto gradientPaint =
994- path->createLinearGradient (i2fl (x1), i2fl (y1), i2fl (x2), i2fl (y2), &gr_screen. current_color , &endColor);
994+ path->createLinearGradient (i2fl (x1), i2fl (y1), i2fl (x2), i2fl (y2), &GR_CURRENT_COLOR , &endColor);
995995
996996 path->moveTo (i2fl (x1), i2fl (y1));
997997 path->lineTo (i2fl (x2), i2fl (y2));
@@ -1017,7 +1017,7 @@ void gr_circle(int xc, int yc, int d, int resize_mode) {
10171017 auto path = beginDrawing (resize_mode);
10181018
10191019 path->circle (i2fl (xc), i2fl (yc), d / 2 .0f );
1020- path->setFillColor (&gr_screen. current_color );
1020+ path->setFillColor (&GR_CURRENT_COLOR );
10211021 path->fill ();
10221022
10231023 endDrawing (path);
@@ -1030,7 +1030,7 @@ void gr_unfilled_circle(int xc, int yc, int d, int resize_mode) {
10301030 auto path = beginDrawing (resize_mode);
10311031
10321032 path->circle (i2fl (xc), i2fl (yc), d / 2 .0f );
1033- path->setStrokeColor (&gr_screen. current_color );
1033+ path->setStrokeColor (&GR_CURRENT_COLOR );
10341034 path->stroke ();
10351035
10361036 endDrawing (path);
@@ -1055,11 +1055,11 @@ void gr_arc(int xc, int yc, float r, float angle_start, float angle_end, bool fi
10551055 path->arc (i2fl (xc), i2fl (yc), r, fl_radians (angle_start), fl_radians (angle_end), DIR_CW);
10561056 path->lineTo (i2fl (xc), i2fl (yc));
10571057
1058- path->setFillColor (&gr_screen. current_color );
1058+ path->setFillColor (&GR_CURRENT_COLOR );
10591059 path->fill ();
10601060 } else {
10611061 path->arc (i2fl (xc), i2fl (yc), r, fl_radians (angle_start), fl_radians (angle_end), DIR_CW);
1062- path->setStrokeColor (&gr_screen. current_color );
1062+ path->setStrokeColor (&GR_CURRENT_COLOR );
10631063 path->stroke ();
10641064 }
10651065
@@ -1110,7 +1110,7 @@ void gr_curve(int xc, int yc, int r, int direction, int resize_mode) {
11101110 }
11111111
11121112 path->arc (centerX, centerY, i2fl (r), beginAngle, endAngle, DIR_CW);
1113- path->setStrokeColor (&gr_screen. current_color );
1113+ path->setStrokeColor (&GR_CURRENT_COLOR );
11141114 path->stroke ();
11151115
11161116 endDrawing (path);
@@ -1131,7 +1131,7 @@ void gr_rect(int x, int y, int w, int h, int resize_mode, float angle) {
11311131 path->translate (-offsetX, -offsetY);
11321132 }
11331133 path->rectangle (i2fl (x), i2fl (y), i2fl (w), i2fl (h));
1134- path->setFillColor (&gr_screen. current_color );
1134+ path->setFillColor (&GR_CURRENT_COLOR );
11351135 path->fill ();
11361136
11371137 endDrawing (path);
0 commit comments