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 19 Nov 2013 11:49:18 AM UTC  
 
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 30 Jan 2014 01:43:39 PM UTC, 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 20 Nov 2013 01:16:15 PM UTC, 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 19 Nov 2013 02:31:48 PM UTC, 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 19 Nov 2013 02:11:18 PM UTC, 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 19 Nov 2013 11:49:18 AM UTC, 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):
   
   
Comment:
   

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 30 Jan 2014 04:33:46 PM UTCbverhegOpen/ClosedOpen=>Closed
    Thu 30 Jan 2014 01:43:39 PM UTCbverhegStatusIn Progress=>Fixed
    Wed 20 Nov 2013 01:16:15 PM UTCsvcauterStatusNone=>In Progress

    Back to the top


    Powered by Savane 3.1-cleanup