/* Helper callback for drawing the cursor itself */ static void screencast_draw_cursor(bContext *UNUSED(C), int x, int y, void *UNUSED(p_ptr)) { glPushMatrix(); glTranslatef((float)x, (float)y, 0.0f); glEnable(GL_LINE_SMOOTH); glEnable(GL_BLEND); glColor4ub(0, 0, 0, 32); glutil_draw_filled_arc(0.0, M_PI * 2.0, 20, 40); glColor4ub(255, 255, 255, 128); glutil_draw_lined_arc(0.0, M_PI * 2.0, 20, 40); glDisable(GL_BLEND); glDisable(GL_LINE_SMOOTH); glPopMatrix(); }
static void wm_gesture_draw_circle(wmGesture *gt) { rcti *rect = (rcti *)gt->customdata; glTranslatef((float)rect->xmin, (float)rect->ymin, 0.0f); glEnable(GL_BLEND); glColor4f(1.0, 1.0, 1.0, 0.05); glutil_draw_filled_arc(0.0, M_PI * 2.0, rect->xmax, 40); glDisable(GL_BLEND); glEnable(GL_LINE_STIPPLE); glColor3ub(96, 96, 96); glLineStipple(1, 0xAAAA); glutil_draw_lined_arc(0.0, M_PI * 2.0, rect->xmax, 40); glColor3ub(255, 255, 255); glLineStipple(1, 0x5555); glutil_draw_lined_arc(0.0, M_PI * 2.0, rect->xmax, 40); glDisable(GL_LINE_STIPPLE); glTranslatef(-rect->xmin, -rect->ymin, 0.0f); }