diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-19 14:40:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-19 14:40:01 +0400 |
commit | a926d9a0d4437943aa8658fd9c1a6c1d6f9c2042 (patch) | |
tree | 1a7f96dae9e724b846271df595d83be6a9bb4129 /source/blender | |
parent | fea5af0d88c7d97862ab428922b13231f88692b6 (diff) |
code cleanup: remove redundant multiplying when jittering widget drawing.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index daec8b3f442..18c6d969222 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -208,9 +208,9 @@ void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y /* for each AA step */ for (j = 0; j < WIDGET_AA_JITTER; j++) { - glTranslatef(1.0f * jit[j][0], 1.0f * jit[j][1], 0.0f); + glTranslatef(jit[j][0], jit[j][1], 0.0f); glDrawArrays(GL_TRIANGLES, 0, 3); - glTranslatef(-1.0f * jit[j][0], -1.0f * jit[j][1], 0.0f); + glTranslatef(-jit[j][0], -jit[j][1], 0.0f); } glDisableClientState(GL_VERTEX_ARRAY); @@ -231,9 +231,9 @@ void ui_draw_anti_roundbox(int mode, float minx, float miny, float maxx, float m glColor4fv(color); for (j = 0; j < WIDGET_AA_JITTER; j++) { - glTranslatef(1.0f * jit[j][0], 1.0f * jit[j][1], 0.0f); + glTranslatef(jit[j][0], jit[j][1], 0.0f); uiDrawBox(mode, minx, miny, maxx, maxy, rad); - glTranslatef(-1.0f * jit[j][0], -1.0f * jit[j][1], 0.0f); + glTranslatef(-jit[j][0], -jit[j][1], 0.0f); } glDisable(GL_BLEND); @@ -777,7 +777,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) glEnableClientState(GL_VERTEX_ARRAY); for (j = 0; j < WIDGET_AA_JITTER; j++) { - glTranslatef(1.0f * jit[j][0], 1.0f * jit[j][1], 0.0f); + glTranslatef(jit[j][0], jit[j][1], 0.0f); /* outline */ glColor4ubv(tcol); @@ -793,7 +793,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) glDrawArrays(GL_QUAD_STRIP, 0, wtb->halfwayvert * 2); } - glTranslatef(-1.0f * jit[j][0], -1.0f * jit[j][1], 0.0f); + glTranslatef(-jit[j][0], -jit[j][1], 0.0f); } glDisableClientState(GL_VERTEX_ARRAY); @@ -807,7 +807,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) (unsigned char)((float)wcol->item[3] / WIDGET_AA_JITTER)}; /* for each AA step */ for (j = 0; j < WIDGET_AA_JITTER; j++) { - glTranslatef(1.0f * jit[j][0], 1.0f * jit[j][1], 0.0f); + glTranslatef(jit[j][0], jit[j][1], 0.0f); if (wtb->tria1.tot) { glColor4ubv(tcol); @@ -818,7 +818,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) widget_trias_draw(&wtb->tria2); } - glTranslatef(-1.0f * jit[j][0], -1.0f * jit[j][1], 0.0f); + glTranslatef(-jit[j][0], -jit[j][1], 0.0f); } } |