[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30424] trunk/blender/source/blender/ editors/space_sequencer/sequencer_draw.c: sequencer outline, credits on a black background wasnt easy to see.
Campbell Barton
ideasman42 at gmail.com
Sat Jul 17 01:17:13 CEST 2010
Revision: 30424
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30424
Author: campbellbarton
Date: 2010-07-17 01:17:13 +0200 (Sat, 17 Jul 2010)
Log Message:
-----------
sequencer outline, credits on a black background wasnt easy to see.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c
Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c 2010-07-16 23:06:48 UTC (rev 30423)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c 2010-07-16 23:17:13 UTC (rev 30424)
@@ -840,32 +840,46 @@
glDisable(GL_TEXTURE_2D);
glDeleteTextures(1, &texid);
- /* safety border */
- if (sseq->mainb == SEQ_DRAW_IMG_IMBUF &&
- (sseq->flag & SEQ_DRAW_SAFE_MARGINS) != 0) {
- float fac= 0.1;
+ if(sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
+
float x1 = v2d->tot.xmin;
float y1 = v2d->tot.ymin;
float x2 = v2d->tot.xmax;
float y2 = v2d->tot.ymax;
-
- float a= fac*(x2-x1);
- x1+= a;
- x2-= a;
-
- a= fac*(y2-y1);
- y1+= a;
- y2-= a;
-
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+
+ /* border */
setlinestyle(3);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+
UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 1.0, 0);
-
- uiSetRoundBox(15);
- gl_round_box(GL_LINE_LOOP, x1, y1, x2, y2, 12.0);
+ glBegin(GL_LINE_LOOP);
+ glVertex2f(x1-0.5, y1-0.5);
+ glVertex2f(x1-0.5, y2+0.5);
+ glVertex2f(x2+0.5, y2+0.5);
+ glVertex2f(x2+0.5, y1-0.5);
+ glEnd();
+
+ /* safety border */
+ if ((sseq->flag & SEQ_DRAW_SAFE_MARGINS) != 0) {
+ float fac= 0.1;
+
+ float a= fac*(x2-x1);
+ x1+= a;
+ x2-= a;
+
+ a= fac*(y2-y1);
+ y1+= a;
+ y2-= a;
+
+ uiSetRoundBox(15);
+ gl_round_box(GL_LINE_LOOP, x1, y1, x2, y2, 12.0);
+
+ }
+
setlinestyle(0);
+
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
More information about the Bf-blender-cvs
mailing list