Revision: 36670 http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36670 Author: blendix Date: 2011-05-13 14:29:07 +0000 (Fri, 13 May 2011) Log Message: ----------- Cycles: action zone drawing tweak.
Modified Paths: -------------- branches/cycles/source/blender/editors/interface/interface_panel.c branches/cycles/source/blender/editors/screen/area.c Modified: branches/cycles/source/blender/editors/interface/interface_panel.c =================================================================== --- branches/cycles/source/blender/editors/interface/interface_panel.c 2011-05-13 14:27:12 UTC (rev 36669) +++ branches/cycles/source/blender/editors/interface/interface_panel.c 2011-05-13 14:29:07 UTC (rev 36670) @@ -509,7 +509,7 @@ if(!(panel->flag & PNL_CLOSEDX)) { ui_draw_aligned_panel_header(style, block, &headrect, 'h'); - /* itemrect smaller */ + /* itemrect smaller */ itemrect.xmax= headrect.xmax - 5.0f/block->aspect; itemrect.xmin= itemrect.xmax - (headrect.ymax-headrect.ymin); itemrect.ymin= headrect.ymin; Modified: branches/cycles/source/blender/editors/screen/area.c =================================================================== --- branches/cycles/source/blender/editors/screen/area.c 2011-05-13 14:27:12 UTC (rev 36669) +++ branches/cycles/source/blender/editors/screen/area.c 2011-05-13 14:29:07 UTC (rev 36670) @@ -69,39 +69,6 @@ /* general area and region code */ -static void region_draw_emboss(ARegion *ar, rcti *scirct) -{ - rcti rect; - - /* translate scissor rect to region space */ - rect.xmin= scirct->xmin - ar->winrct.xmin; - rect.ymin= scirct->ymin - ar->winrct.ymin; - rect.xmax= scirct->xmax - ar->winrct.xmin; - rect.ymax= scirct->ymax - ar->winrct.ymin; - - /* set transp line */ - glEnable( GL_BLEND ); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); - - /* right */ - glColor4ub(0,0,0, 50); - sdrawline(rect.xmax, rect.ymin, rect.xmax, rect.ymax); - - /* bottom */ - glColor4ub(0,0,0, 80); - sdrawline(rect.xmin, rect.ymin, rect.xmax, rect.ymin); - - /* top */ - glColor4ub(255,255,255, 60); - sdrawline(rect.xmin, rect.ymax, rect.xmax, rect.ymax); - - /* left */ - glColor4ub(255,255,255, 50); - sdrawline(rect.xmin, rect.ymin, rect.xmin, rect.ymax); - - glDisable( GL_BLEND ); -} - void ED_region_pixelspace(ARegion *ar) { int width= ar->winrct.xmax-ar->winrct.xmin+1; @@ -152,7 +119,6 @@ /* only exported for WM */ void ED_area_overdraw_flush(ScrArea *sa, ARegion *ar) { -#if 0 AZone *az; for(az= sa->actionzones.first; az; az= az->next) { @@ -166,30 +132,21 @@ az->do_draw= 1; } } -#endif } static void area_draw_azone(short x1, short y1, short x2, short y2) { - int dx= floor(0.3f*(x2-x1)); - int dy= floor(0.3f*(y2-y1)); - - glColor4ub(255, 255, 255, 180); - fdrawline(x1, y2, x2, y1); - glColor4ub(255, 255, 255, 130); - fdrawline(x1, y2-dy, x2-dx, y1); - glColor4ub(255, 255, 255, 80); - fdrawline(x1, y2-2*dy, x2-2*dx, y1); - - glColor4ub(0, 0, 0, 210); - fdrawline(x1, y2+1, x2+1, y1); - glColor4ub(0, 0, 0, 180); - fdrawline(x1, y2-dy+1, x2-dx+1, y1); - glColor4ub(0, 0, 0, 150); - fdrawline(x1, y2-2*dy+1, x2-2*dx+1, y1); + int dx= floor(0.9f*(x2-x1)); + int dy= floor(0.9f*(y2-y1)); + + glColor4f(0.0f, 0.0f, 0.0f, 0.25f); + glBegin(GL_TRIANGLES); + glVertex2f(x1, y1); + glVertex2f(x1+dx, y1); + glVertex2f(x1, y1+dy); + glEnd(); } - static void region_draw_azone(AZone *az) { GLUquadricObj *qobj = NULL; @@ -233,7 +190,6 @@ /* only exported for WM */ void ED_area_overdraw(bContext *C) { -#if 0 wmWindow *win= CTX_wm_window(C); bScreen *screen= CTX_wm_screen(C); ScrArea *sa; @@ -259,7 +215,7 @@ } } glDisable( GL_BLEND ); -#endif + } /* get scissor rect, checking overlapping regions */ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs