Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#3 Clipping Bug 0.11

v1.0_(example)
closed-fixed
Sean Riley
5
2001-05-20
2001-05-20
Bob Ippolito
No

Windows seem to clip their content to their edges, not
inside of the borders. Should be a quick fix, appears
to affect all layouts.

Discussion

  • Sean Riley
    Sean Riley
    2001-05-20

    Logged In: YES
    user_id=212712

    hm.. this one is not so simple.
    widgets set their clipping area by calling Base.draw() but
    this overrides the clipping area set by the parent. So
    widgets are not clipped to their parent panels, but to
    their individual dimensions.
    When a actual pyui.widgets.Window is drawn, it uses an
    offscreen surface so a widgets cannot draw outside
    it's "window" but can draw outside it's "panel".

     
  • Bob Ippolito
    Bob Ippolito
    2001-05-20

    Logged In: YES
    user_id=139309

    I think panels should have their own offscreen surface..
    like frames in a web browser.. so they can scroll on their
    own like real windows do... I suppose it would sacrifice a
    bit of performance (hardware blits are fast anyways..), but
    add a lot of potential as far as functionality goes

    if the content overflows the panel, the panel could have
    scrollbars.. that'd be cool, for the level designer I am
    doing it is going to need that sort of functionality.. the
    game is a sidescroller so I will need a really wide
    scrollable horizontally scrollable panel where many object
    can be dragged from the palette panel and dropped into the
    level panel.

     
  • Sean Riley
    Sean Riley
    2001-05-20

    • status: open --> closed-fixed
     
  • Sean Riley
    Sean Riley
    2001-05-20

    Logged In: YES
    user_id=212712

    having all panels use off-screen surfaces is would use much
    more video memory and caues a pretty big performance hit I
    think.
    A fully scrollable panel/widget is definately functionality
    that would be useful but i don't think generalizing all
    panels to have that functionality is required.
    A "ScrollablePanel" is probably a better implementation.

    I think i just fixed the clipping problem. Clipping now
    happens at the panel level by default, not the widget
    level. Panel remember the clipping rect of their parent and
    reset it to that when they are done drawing.

    This also removes the requirement for every widget to call
    Base.draw(screen) in it's draw method.

     
  • Sean Riley
    Sean Riley
    2001-05-20

    • assigned_to: nobody --> mrriley