Problem with Image's clipping

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

houhou_x
Just popping in
Just popping in
Posts: 3
Joined: Fri Oct 10, 2008 03:54

Problem with Image's clipping

Postby houhou_x » Wed Oct 27, 2010 06:32

Hey, if an image defined XOffset or YOffset, its rendering-area will be fixed by d_scaledOffset.

Code: Select all

   
void Image::draw(GeometryBuffer& buffer, const Rect& dest_rect,
    const Rect* clip_rect, const ColourRect& colours,
    QuadSplitMode quad_split_mode) const
{
    Rect dest(dest_rect);

    // apply rendering offset to the destination Rect
    dest.offset(d_scaledOffset);

    // draw
    d_owner->draw(buffer, d_area, dest, clip_rect, colours, quad_split_mode);
}

but its clipping-area has not been fixed. So this kind of images will display wrong. :(

I am not sure this is a bug, check it please, thanks :)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Problem with Image's clipping

Postby CrazyEddie » Wed Oct 27, 2010 08:54

No version - or other - information has been provided here, your report is worthless. Please stop wasting our time with such pointless posts. Read the posts that tell you what information is required and, perhaps, try again. If you can't post the required information, do not post at all.

Thanks,

CE.

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Problem with Image's clipping

Postby Jamarr » Wed Oct 27, 2010 17:31

If you do not post the version of CEGUI you are using, preferably by copy/pasting the required section of your CEGUI.log file, we cannot even begin to diagnose your issue. It may be that this issue has already been fixed in a newer version or you may be using an unsupported version; and there is no guarantee that one answer works for all versions. So to avoid wasting everyone's time you must provide all relevant information before anyone can help you :hammer:
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

houhou_x
Just popping in
Just popping in
Posts: 3
Joined: Fri Oct 10, 2008 03:54

Re: Problem with Image's clipping

Postby houhou_x » Wed Nov 17, 2010 09:29

I really sorry about my carelessness :oops:

I compiled CEGUI 0.7.4 manually and run Sample_TreeDemo, I found the open-branch-icon and close-branch-icon disappeared.

Image

I checked "TaharezLook.imageset" and found these two images are defined:

Code: Select all

   <Image Name="TreeListClosed" XPos="175" YPos="111" Width="7" Height="11" XOffset="8" YOffset="2" />
   <Image Name="TreeListOpened" XPos="164" YPos="111" Width="11" Height="7" XOffset="8" YOffset="2"/>

They have properties of "XOffset" and "YOffset".

Then I checked CEGUI code,

Code: Select all

   
    void Image::draw(GeometryBuffer& buffer, const Rect& dest_rect,
        const Rect* clip_rect, const ColourRect& colours,
        QuadSplitMode quad_split_mode) const
    {
        Rect dest(dest_rect);

        // apply rendering offset to the destination Rect
        dest.offset(d_scaledOffset);

        // draw
        d_owner->draw(buffer, d_area, dest, clip_rect, colours, quad_split_mode);
    }

The rendering-area is fixed by d_scaledOffset, but clip-area is not.
I don't know whether this is a bug.

thanks again~

User avatar
Mikademus
CEGUI MVP
CEGUI MVP
Posts: 130
Joined: Wed Mar 18, 2009 19:14

Re: Problem with Image's clipping

Postby Mikademus » Thu Nov 18, 2010 20:48

Have you checked if something devious is happening in the tree class? The reason I'm asking this is because it a 3:rd party hatchet job giving everyone headaches and suicidal impulses and is not actually considered part of the stable CEGUI package but rather something that can't be done away with until there is a replacement for it. The Tree class has been known to take unique liberties before...

Then again it might be an actual bug, I'm just warning before CE goes berserk over the Tree widget ;) I too have struggled with it and learned to loath it.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Problem with Image's clipping

Postby CrazyEddie » Sun Nov 21, 2010 09:43

:lol: Good reply!!

I've seen this also, and I blame the tree widget completely ;) Images are used with offsets elsewhere without issue, so there's probably something incorrect in either the looknfeel or the WindowRenderer for the Tree, though to be completely honest, I have no intention of looking at it :P

CE.


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 8 guests