bugpyFormex - Bugs: bug #40632, gl2 engine uses default draw...


bug #40632: gl2 engine uses default draw options instead of object attributes

Submitted by:  Sofie Van Cauter <svcauter>
Submitted on:  Tue Nov 19 11:49:18 2013  
Category: RenderingSeverity: 3 - Normal
Item Group: Feature requestStatus: Fixed
Privacy: PublicAssigned to: Benedict Verhegghe <bverheg>
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Thu Jan 30 13:43:39 2014, comment #4:

This issue is fixed, as shown by the following script:

F has prop 1 and is drawn red
G has prop 1 and attrib green, so is drawn green
H has prop 1 and attrib green, but is drawn blue by argument

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Wed Nov 20 13:16:15 2013, comment #3:

The attributes to be used for the gl2 GeomActor were modified in 22e5150.

TODO: remove some arguments from the draw() kargs (e.g. view,bbox) before passing kargs to the actor.

Sofie Van Cauter <svcauter>
Project Member
Tue Nov 19 14:31:48 2013, comment #2:

This seems to be correct. Some of the attributes are however also used in the draw() function (e.g. clear_, view, bbox,highlight).

Sofie Van Cauter <svcauter>
Project Member
Tue Nov 19 14:11:18 2013, comment #1:

That seems indeed the logical way to do.
So pf.canvas.drawoptions should be removed from the draw() functions (i.e. just passing kargs to the Actor's _init_,
and there an Attributes should be created with the pf.canvas.drawoptions as default?

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Tue Nov 19 11:49:18 2013, original submission:

With the gl2 engine, the following code will draw the object in black instead of red:

The draw function passes the default canvas draw options to the actor:

and consequently the object attributes are overwritten by the default draw options in the GeomActor creation:

However, it seems more logical to me to
- use the draw option if specified: e.g. draw(F,color=...)
- otherwise, use the object attribute if specified: e.g. F.attrib(color=...)
- otherwise, use the default draw option: i.e. color = 'prop'

Is this indeed the preferred order and what is the best way to implement this?

Sofie Van Cauter <svcauter>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by bverheg (Posted a comment)
  • -unavailable- added by svcauter (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Jan 30 16:33:46 2014bverhegOpen/ClosedOpen=>Closed
    Thu Jan 30 13:43:39 2014bverhegStatusIn Progress=>Fixed
    Wed Nov 20 13:16:15 2013svcauterStatusNone=>In Progress

    Back to the top

    Powered by Savane 3.1-cleanup1