~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/blender/src/drawseq.c

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2007-05-17 11:47:59 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070517114759-yp4ybrnhp2u7pk66
Tags: 2.44-1
* New upstream release.
* Drop debian/patches/01_64bits_stupidity, not needed anymore: as of this
  version blender is 64 bits safe again. Adjust README.Debian accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * $Id: drawseq.c,v 1.71 2006/12/31 15:38:14 schlaile Exp $
 
2
 * $Id: drawseq.c,v 1.74 2007/04/04 13:18:32 campbellbarton Exp $
3
3
 *
4
4
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
5
5
 *
251
251
        WHILE_SEQ(&seqm->seqbase) {
252
252
                get_seq_color3ubv(seq, col);
253
253
                
254
 
                glColor3ubv(col);
 
254
                glColor3ubv((GLubyte *)col);
255
255
 
256
256
                glRectf(x1,  y1,  x1+0.9*dx,  y2);
257
257
                
258
258
                BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -30);
259
 
                glColor3ubv(col);
 
259
                glColor3ubv((GLubyte *)col);
260
260
 
261
261
                fdrawbox(x1,  y1,  x1+0.9*dx,  y2);
262
262
                
521
521
        if(seq->startstill) {
522
522
                get_seq_color3ubv(seq, col);
523
523
                BIF_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.75, 40);
524
 
                glColor3ubv(col);
 
524
                glColor3ubv((GLubyte *)col);
525
525
                
526
526
                draw_shadedstrip(seq, col, x1, y1, (float)(seq->start), y2);
527
527
                
530
530
                if (seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 24);
531
531
                else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -16);
532
532
                
533
 
                glColor3ubv(col);
 
533
                glColor3ubv((GLubyte *)col);
534
534
                
535
535
                for(a=y1; a< y2; a+= pixely*2.0 ) {
536
536
                        fdrawline(x1,  a,  (float)(seq->start),  a);
539
539
        if(seq->endstill) {
540
540
                get_seq_color3ubv(seq, col);
541
541
                BIF_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.75, 40);
542
 
                glColor3ubv(col);
 
542
                glColor3ubv((GLubyte *)col);
543
543
                
544
544
                draw_shadedstrip(seq, col, (float)(seq->start+seq->len), y1, x2, y2);
545
545
                
548
548
                if (seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 24);
549
549
                else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -16);
550
550
                
551
 
                glColor3ubv(col);
 
551
                glColor3ubv((GLubyte *)col);
552
552
                
553
553
                for(a=y1; a< y2; a+= pixely*2.0 ) {
554
554
                        fdrawline((float)(seq->start+seq->len),  a,  x2,  a);
629
629
        BMF_DrawString(G.font, strp);
630
630
}
631
631
 
632
 
/* draws a shaded strip, made from gradient + flat colour + gradient */
 
632
/* draws a shaded strip, made from gradient + flat color + gradient */
633
633
static void draw_shadedstrip(Sequence *seq, char *col, float x1, float y1, float x2, float y2)
634
634
{
635
635
        float ymid1, ymid2;
643
643
        if(seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -50);
644
644
        else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 0);
645
645
        
646
 
        glColor3ubv(col);
 
646
        glColor3ubv((GLubyte *)col);
647
647
        
648
648
        glVertex2f(x1,y1);
649
649
        glVertex2f(x2,y1);
651
651
        if(seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 5);
652
652
        else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -5);
653
653
 
654
 
        glColor3ubv(col);
 
654
        glColor3ubv((GLubyte *)col);
655
655
        
656
656
        glVertex2f(x2,ymid1);
657
657
        glVertex2f(x1,ymid1);
668
668
        if(seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -15);
669
669
        else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 25);
670
670
        
671
 
        glColor3ubv(col);
 
671
        glColor3ubv((GLubyte *)col);
672
672
        
673
673
        glVertex2f(x2,y2);
674
674
        glVertex2f(x1,y2);
697
697
        y2= seq->machine+SEQ_STRIP_OFSTOP;
698
698
        
699
699
        
700
 
        /* get the correct colour per strip type*/
 
700
        /* get the correct color per strip type*/
701
701
        get_seq_color3ubv(seq, col);
702
702
        
703
703
        /* draw the main strip body */
723
723
        else if (seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -150);
724
724
        else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -60);
725
725
 
726
 
        glColor3ubv(col);
 
726
        glColor3ubv((GLubyte *)col);
727
727
        gl_round_box_shade(GL_LINE_LOOP, x1, y1, x2, y2, 0.0, 0.1, 0.0);
728
728
 
729
729
        
1060
1060
                VarStruct *varstr;
1061
1061
                int a, xco, yco;
1062
1062
 
 
1063
                get_sequence_effect(last_seq);/* make sure, plugin is loaded */
 
1064
 
1063
1065
                uiDefBut(block, LABEL, 0, "Type: Plugin", 10,50,70,20, 0, 0, 0, 0, 0, "");
1064
1066
 
1065
1067
                pis= last_seq->plugin;