List Info

Thread: CR-Client: fix user-set clipping rect




CR-Client: fix user-set clipping rect
country flaguser name
United States
2007-12-05 12:59:13
Suggested reviewer: Greg. But Henry, you
probably want to take a look at this since it
could affect the calls you make to IHXSite3::SetClipRect().

Description
-----------------------------------
Recently an IHXSite3 interface was added which gave
the user of a site the ability to set a clipping rect
on the site. However, when it was added, it was assumed
that the sites were zero-based (that is, they did not
have a parent) since the clip rect was not offset
by site's coordinates. So if you only set a clip
rect on the top-level site, then it worked fine.
However, for SMIL where you might want to set
clip rects on sites with non-zero offsets, then
there was a bug. This change fixes that bug.

Files Modified
-----------------------------------
video/sitelib/basesite.cpp

Branches
-----------------------------------
HEAD, 150Cay, 203Cay, 204Cay, 310Atlas

Index: basesite.cpp
============================================================
=======
RCS file: /cvsroot/video/sitelib/basesite.cpp,v
retrieving revision 1.51
diff -u -w -u -w -r1.51 basesite.cpp
--- basesite.cpp        17 Oct 2007 21:40:18 -0000     
1.51
+++ basesite.cpp        5 Dec 2007 18:58:22 -0000
 -90,6
+90,7 
 #include "addupcol.h"
 #include "mmx_util.h"
 #include "pckunpck.h"
+#include "hxtlogutil.h"

 #ifdef _WINDOWS
 #include "winsite.h"
 -279,6
+280,7 
     , m_bWindowless(FALSE)
     , m_pSiteEventHandler(NULL)
 {
+    HXLOGL4(HXLOG_SITE, "CON CHXBaseSite
this=%p", this);
     m_fpTransitionEffect =
z_TransitionTable[0].m_pSubTypes[0].m_fpTranFunction;

     //If we are not being aggregated then just point the
outer unkown
 -383,6
+385,7 
  */
 CHXBaseSite::~CHXBaseSite()
 {
+    HXLOGL4(HXLOG_SITE, "DES CHXBaseSite
this=%p", this);
     HX_RELEASE(m_pMutex);
     HX_RELEASE(m_pDummyThread);

 -3078,14
+3081,52 
 STDMETHODIMP CHXBaseSite::SetClipRect(THIS_ const
REF(HXxRect) clipRect)
 {
     _TLSLock();
-    m_clipRect = clipRect;

-    // set all the children as well
+    if (m_size.cx > 0 && m_size.cy > 0)
+    {
+        // We assume that the user calls SetClipRect with a
rect that
+        // is in the SITE's coordinate space; that is, the
user assumes
+        // that the site's rect is
(left=0,top=0,right=siteWidth,bottom=siteHeight)
+        // and then computes the clipRect within that, so
clipRect
+        // should always be inside the site's rect.
However,
+        // just to be sure, we will clip the clipRect to
the
+        // dimensions of the site's rect.
+        //
+        // Create a zero-based rect for the whole site
+        HXxRect rectWholeSite = {0, 0, m_size.cx,
m_size.cy};
+        // Intersect the input clipRect with the zero-based
rect for the whole site
+        HXxRect rectClip = {0, 0, 0, 0};
+        HXxRect_Intersection(rectWholeSite, clipRect,
&rectClip);
+        // Make sure we have a non-empty rect after this
intersection
+        if (!HXxRect_IsEmpty(rectClip))
+        {
+            // To put clipRect into coordinate space of the
top-level site,
+            // we need to offset it by m_topleft.
+            m_clipRect = rectClip;
+            HXxRect_Offset(m_clipRect, m_topleft.x,
m_topleft.y);
+            // Now we need to set the clipRect into all the
children.
+            // We need to offset the input zero-based
clipRect by
+            // the children's position.
     LISTPOSITION pos =
m_ChildrenInZOrder.GetHeadPosition();
     while(pos)
     {
         CHXBaseSite* pSite =
(CHXBaseSite*)m_ChildrenInZOrder.GetNext(pos);
-        pSite->SetClipRect(clipRect);
+                if (pSite)
+                {
+                    // Get the child site's position. This
is their position
+                    // relative to their parent.
+                    HXxPoint ptChild = {0, 0};
+                    pSite->GetPosition(ptChild);
+                    // Make a copy of the input clipRect
+                    HXxRect rectChildClip = rectClip;
+                    // Subtract the offset of the child
site from the input clipRect
+                    HXxRect_Offset(rectChildClip,
-ptChild.x, -ptChild.y);
+                    // Now call SetClipRect on the child.
Each child will
+                    // take care above to clip against its
own rect.
+                    pSite->SetClipRect(rectChildClip);
+                }
+            }
+        }
     }

     _TLSUnlock();
 -4597,25
+4638,6 
         if (m_pParentSite)
            
m_pParentSite->BuildParnetClipping(m_RegionWithoutChildre
n,this);

-        // honor the clip region if it's set and we are not
in FullScreen
-        // this can happen when we are in Windowless mode.
-        //
-        // whether this is a good place to do the clipping
is still pending
-        // further investigation, but this place is working
OK for now.
-        if (!IsFullScreen() &&
!HXxRect_IsEmpty(m_clipRect))
-        {
-            HXREGION* clipRegion =
HXCreateRectRegion(m_clipRect.left, m_clipRect.top,
-                                                     
m_clipRect.right-m_clipRect.left,
-                                                     
m_clipRect.bottom-m_clipRect.top);
-
-            if (clipRegion->numRects != 0)
-            {
-                HXIntersectRegion(m_RegionWithoutChildren,
clipRegion, m_RegionWithoutChildren);
-            }
-
-            HXDestroyRegion(clipRegion);
-        }
-
         // subtract all of my children from my clipping
region
         m_Region = HXCreateRectRegion(0,0,0,0);

 -6731,7
+6753,21 
         m_fpTransitionEffect == FadeToColor
         )
     {
-        return m_fpTransitionEffect(left, top, right,
bottom, completeness, m_pContext, NULL);
+        HXREGION* pRetRegion = m_fpTransitionEffect(left,
top, right, bottom, completeness, m_pContext, NULL);
+        if (pRetRegion &&
!HXxRect_IsEmpty(m_clipRect))
+        {
+            // Create a region from the user-set clip rect
+            HXREGION* pUserClipRegion =
HXCreateRectRegion(m_clipRect.left,
+                                                          
m_clipRect.top,
+                                                          
HXxRECT_WIDTH(m_clipRect),
+                                                          
HXxRECT_HEIGHT(m_clipRect));
+            if (pUserClipRegion)
+            {
+                HXIntersectRegion(pRetRegion,
pUserClipRegion, pRetRegion);
+            }
+            HXDestroyRegion(pUserClipRegion);
+        }
+        return pRetRegion;
     }

     tranLines* tmpLines = (completeness > 0 &&
completeness < 1000) ? lines : NULL;
 -6761,16
+6797,24 
     if (!(m_bTransitionTranIn ^ m_bTransitionReversed))
         retRGN = InvertRGN(retRGN, left, top, right,
bottom);

-    //Intersect with our rect.
-    HXREGION* pMe = HXCreateRectRegion( m_topleft.x,
+    // Create a rect of the whole site
+    HXxRect rectThisSite = {m_topleft.x,
                                         m_topleft.y,
-                                        m_size.cx,
-                                        m_size.cy
-                                        );
+                            m_topleft.x + m_size.cx,
+                            m_topleft.y + m_size.cy};
+    if (!HXxRect_IsEmpty(m_clipRect))
+    {
+        // Intersect the clipRect with the whole-site rect
+        HXxRect_Intersection(rectThisSite, m_clipRect,
&rectThisSite);
+    }
+    // Create a region of our (potentially user-clipped)
site
+    HXREGION* pMe = HXCreateRectRegion(rectThisSite.left,
+                                       rectThisSite.top,
+                                      
HXxRECT_WIDTH(rectThisSite),
+                                      
HXxRECT_HEIGHT(rectThisSite));
     HXIntersectRegion( retRGN, pMe, retRGN );
     HXDestroyRegion( pMe );

-
     return retRGN;
 }


=============================================
Eric Hyche (ehychereal.com)
Technical Lead
RealNetworks, Inc. 


_______________________________________________
Video-dev mailing list
Video-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/video
-dev

Re: CR-Client: fix user-set clipping rect
country flaguser name
United States
2007-12-05 13:06:10
Looks good.
--greg.


Eric Hyche wrote:
> Suggested reviewer: Greg. But Henry, you
> probably want to take a look at this since it
> could affect the calls you make to
IHXSite3::SetClipRect().
> 
> Description
> -----------------------------------
> Recently an IHXSite3 interface was added which gave
> the user of a site the ability to set a clipping rect
> on the site. However, when it was added, it was
assumed
> that the sites were zero-based (that is, they did not
> have a parent) since the clip rect was not offset
> by site's coordinates. So if you only set a clip
> rect on the top-level site, then it worked fine.
> However, for SMIL where you might want to set
> clip rects on sites with non-zero offsets, then
> there was a bug. This change fixes that bug.
> 
> Files Modified
> -----------------------------------
> video/sitelib/basesite.cpp
> 
> Branches
> -----------------------------------
> HEAD, 150Cay, 203Cay, 204Cay, 310Atlas
> 
> Index: basesite.cpp
>
============================================================
=======
> RCS file: /cvsroot/video/sitelib/basesite.cpp,v
> retrieving revision 1.51
> diff -u -w -u -w -r1.51 basesite.cpp
> --- basesite.cpp        17 Oct 2007 21:40:18 -0000     
1.51
> +++ basesite.cpp        5 Dec 2007 18:58:22 -0000
>  -90,6 +90,7 
>  #include "addupcol.h"
>  #include "mmx_util.h"
>  #include "pckunpck.h"
> +#include "hxtlogutil.h"
> 
>  #ifdef _WINDOWS
>  #include "winsite.h"
>  -279,6 +280,7 
>      , m_bWindowless(FALSE)
>      , m_pSiteEventHandler(NULL)
>  {
> +    HXLOGL4(HXLOG_SITE, "CON CHXBaseSite
this=%p", this);
>      m_fpTransitionEffect =
z_TransitionTable[0].m_pSubTypes[0].m_fpTranFunction;
> 
>      //If we are not being aggregated then just point
the outer unkown
>  -383,6 +385,7 
>   */
>  CHXBaseSite::~CHXBaseSite()
>  {
> +    HXLOGL4(HXLOG_SITE, "DES CHXBaseSite
this=%p", this);
>      HX_RELEASE(m_pMutex);
>      HX_RELEASE(m_pDummyThread);
> 
>  -3078,14 +3081,52 
>  STDMETHODIMP CHXBaseSite::SetClipRect(THIS_ const
REF(HXxRect) clipRect)
>  {
>      _TLSLock();
> -    m_clipRect = clipRect;
> 
> -    // set all the children as well
> +    if (m_size.cx > 0 && m_size.cy > 0)
> +    {
> +        // We assume that the user calls SetClipRect
with a rect that
> +        // is in the SITE's coordinate space; that is,
the user assumes
> +        // that the site's rect is
(left=0,top=0,right=siteWidth,bottom=siteHeight)
> +        // and then computes the clipRect within that,
so clipRect
> +        // should always be inside the site's rect.
However,
> +        // just to be sure, we will clip the clipRect
to the
> +        // dimensions of the site's rect.
> +        //
> +        // Create a zero-based rect for the whole
site
> +        HXxRect rectWholeSite = {0, 0, m_size.cx,
m_size.cy};
> +        // Intersect the input clipRect with the
zero-based rect for the whole site
> +        HXxRect rectClip = {0, 0, 0, 0};
> +        HXxRect_Intersection(rectWholeSite, clipRect,
&rectClip);
> +        // Make sure we have a non-empty rect after
this intersection
> +        if (!HXxRect_IsEmpty(rectClip))
> +        {
> +            // To put clipRect into coordinate space
of the top-level site,
> +            // we need to offset it by m_topleft.
> +            m_clipRect = rectClip;
> +            HXxRect_Offset(m_clipRect, m_topleft.x,
m_topleft.y);
> +            // Now we need to set the clipRect into
all the children.
> +            // We need to offset the input zero-based
clipRect by
> +            // the children's position.
>      LISTPOSITION pos =
m_ChildrenInZOrder.GetHeadPosition();
>      while(pos)
>      {
>          CHXBaseSite* pSite =
(CHXBaseSite*)m_ChildrenInZOrder.GetNext(pos);
> -        pSite->SetClipRect(clipRect);
> +                if (pSite)
> +                {
> +                    // Get the child site's position.
This is their position
> +                    // relative to their parent.
> +                    HXxPoint ptChild = {0, 0};
> +                    pSite->GetPosition(ptChild);
> +                    // Make a copy of the input
clipRect
> +                    HXxRect rectChildClip = rectClip;
> +                    // Subtract the offset of the
child site from the input clipRect
> +                    HXxRect_Offset(rectChildClip,
-ptChild.x, -ptChild.y);
> +                    // Now call SetClipRect on the
child. Each child will
> +                    // take care above to clip against
its own rect.
> +                   
pSite->SetClipRect(rectChildClip);
> +                }
> +            }
> +        }
>      }
> 
>      _TLSUnlock();
>  -4597,25 +4638,6 
>          if (m_pParentSite)
>             
m_pParentSite->BuildParnetClipping(m_RegionWithoutChildre
n,this);
> 
> -        // honor the clip region if it's set and we
are not in FullScreen
> -        // this can happen when we are in Windowless
mode.
> -        //
> -        // whether this is a good place to do the
clipping is still pending
> -        // further investigation, but this place is
working OK for now.
> -        if (!IsFullScreen() &&
!HXxRect_IsEmpty(m_clipRect))
> -        {
> -            HXREGION* clipRegion =
HXCreateRectRegion(m_clipRect.left, m_clipRect.top,
> -                                                     
m_clipRect.right-m_clipRect.left,
> -                                                     
m_clipRect.bottom-m_clipRect.top);
> -
> -            if (clipRegion->numRects != 0)
> -            {
> -               
HXIntersectRegion(m_RegionWithoutChildren, clipRegion,
m_RegionWithoutChildren);
> -            }
> -
> -            HXDestroyRegion(clipRegion);
> -        }
> -
>          // subtract all of my children from my
clipping region
>          m_Region = HXCreateRectRegion(0,0,0,0);
> 
>  -6731,7 +6753,21 
>          m_fpTransitionEffect == FadeToColor
>          )
>      {
> -        return m_fpTransitionEffect(left, top, right,
bottom, completeness, m_pContext, NULL);
> +        HXREGION* pRetRegion =
m_fpTransitionEffect(left, top, right, bottom, completeness,
m_pContext, NULL);
> +        if (pRetRegion &&
!HXxRect_IsEmpty(m_clipRect))
> +        {
> +            // Create a region from the user-set clip
rect
> +            HXREGION* pUserClipRegion =
HXCreateRectRegion(m_clipRect.left,
> +                                                      
    m_clipRect.top,
> +                                                      
    HXxRECT_WIDTH(m_clipRect),
> +                                                      
    HXxRECT_HEIGHT(m_clipRect));
> +            if (pUserClipRegion)
> +            {
> +                HXIntersectRegion(pRetRegion,
pUserClipRegion, pRetRegion);
> +            }
> +            HXDestroyRegion(pUserClipRegion);
> +        }
> +        return pRetRegion;
>      }
> 
>      tranLines* tmpLines = (completeness > 0
&& completeness < 1000) ? lines : NULL;
>  -6761,16 +6797,24 
>      if (!(m_bTransitionTranIn ^
m_bTransitionReversed))
>          retRGN = InvertRGN(retRGN, left, top, right,
bottom);
> 
> -    //Intersect with our rect.
> -    HXREGION* pMe = HXCreateRectRegion( m_topleft.x,
> +    // Create a rect of the whole site
> +    HXxRect rectThisSite = {m_topleft.x,
>                                          m_topleft.y,
> -                                        m_size.cx,
> -                                        m_size.cy
> -                                        );
> +                            m_topleft.x + m_size.cx,
> +                            m_topleft.y + m_size.cy};
> +    if (!HXxRect_IsEmpty(m_clipRect))
> +    {
> +        // Intersect the clipRect with the whole-site
rect
> +        HXxRect_Intersection(rectThisSite, m_clipRect,
&rectThisSite);
> +    }
> +    // Create a region of our (potentially
user-clipped) site
> +    HXREGION* pMe =
HXCreateRectRegion(rectThisSite.left,
> +                                      
rectThisSite.top,
> +                                      
HXxRECT_WIDTH(rectThisSite),
> +                                      
HXxRECT_HEIGHT(rectThisSite));
>      HXIntersectRegion( retRGN, pMe, retRGN );
>      HXDestroyRegion( pMe );
> 
> -
>      return retRGN;
>  }
> 
> 
> =============================================
> Eric Hyche (ehychereal.com)
> Technical Lead
> RealNetworks, Inc. 
> 
> 
> _______________________________________________
> Video-dev mailing list
> Video-devhelixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/video
-dev


_______________________________________________
Video-dev mailing list
Video-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/video
-dev

CN-Client: fix user-set clipping rect
country flaguser name
United States
2007-12-05 14:55:54
Thanks for the review, Greg.

This is now checked into HEAD, 150Cay, 203Cay,
204Cay, and 310Atlas.

=============================================
Eric Hyche (ehychereal.com)
Technical Lead
RealNetworks, Inc.  

> -----Original Message-----
> From: Greg Wright [mailto:gwrightreal.com] 
> Sent: Wednesday, December 05, 2007 2:06 PM
> To: ehychereal.com
> Cc: video-devlists.helixcommunity.org
> Subject: Re: [Video-dev] CR-Client: fix user-set
clipping rect
> 
> Looks good.
> --greg.
> 
> 
> Eric Hyche wrote:
> > Suggested reviewer: Greg. But Henry, you
> > probably want to take a look at this since it
> > could affect the calls you make to
IHXSite3::SetClipRect().
> > 
> > Description
> > -----------------------------------
> > Recently an IHXSite3 interface was added which
gave
> > the user of a site the ability to set a clipping
rect
> > on the site. However, when it was added, it was
assumed
> > that the sites were zero-based (that is, they did
not
> > have a parent) since the clip rect was not offset
> > by site's coordinates. So if you only set a clip
> > rect on the top-level site, then it worked fine.
> > However, for SMIL where you might want to set
> > clip rects on sites with non-zero offsets, then
> > there was a bug. This change fixes that bug.
> > 
> > Files Modified
> > -----------------------------------
> > video/sitelib/basesite.cpp
> > 
> > Branches
> > -----------------------------------
> > HEAD, 150Cay, 203Cay, 204Cay, 310Atlas
> > 
> > Index: basesite.cpp
> >
============================================================
=======
> > RCS file: /cvsroot/video/sitelib/basesite.cpp,v
> > retrieving revision 1.51
> > diff -u -w -u -w -r1.51 basesite.cpp
> > --- basesite.cpp        17 Oct 2007 21:40:18 -0000
     1.51
> > +++ basesite.cpp        5 Dec 2007 18:58:22 -0000
> >  -90,6 +90,7 
> >  #include "addupcol.h"
> >  #include "mmx_util.h"
> >  #include "pckunpck.h"
> > +#include "hxtlogutil.h"
> > 
> >  #ifdef _WINDOWS
> >  #include "winsite.h"
> >  -279,6 +280,7 
> >      , m_bWindowless(FALSE)
> >      , m_pSiteEventHandler(NULL)
> >  {
> > +    HXLOGL4(HXLOG_SITE, "CON CHXBaseSite
this=%p", this);
> >      m_fpTransitionEffect = 
> z_TransitionTable[0].m_pSubTypes[0].m_fpTranFunction;
> > 
> >      //If we are not being aggregated then just
point the 
> outer unkown
> >  -383,6 +385,7 
> >   */
> >  CHXBaseSite::~CHXBaseSite()
> >  {
> > +    HXLOGL4(HXLOG_SITE, "DES CHXBaseSite
this=%p", this);
> >      HX_RELEASE(m_pMutex);
> >      HX_RELEASE(m_pDummyThread);
> > 
> >  -3078,14 +3081,52 
> >  STDMETHODIMP CHXBaseSite::SetClipRect(THIS_ const

> REF(HXxRect) clipRect)
> >  {
> >      _TLSLock();
> > -    m_clipRect = clipRect;
> > 
> > -    // set all the children as well
> > +    if (m_size.cx > 0 && m_size.cy
> 0)
> > +    {
> > +        // We assume that the user calls
SetClipRect with 
> a rect that
> > +        // is in the SITE's coordinate space;
that is, the 
> user assumes
> > +        // that the site's rect is 
> (left=0,top=0,right=siteWidth,bottom=siteHeight)
> > +        // and then computes the clipRect within
that, so clipRect
> > +        // should always be inside the site's
rect. However,
> > +        // just to be sure, we will clip the
clipRect to the
> > +        // dimensions of the site's rect.
> > +        //
> > +        // Create a zero-based rect for the whole
site
> > +        HXxRect rectWholeSite = {0, 0, m_size.cx,
m_size.cy};
> > +        // Intersect the input clipRect with the

> zero-based rect for the whole site
> > +        HXxRect rectClip = {0, 0, 0, 0};
> > +        HXxRect_Intersection(rectWholeSite,
clipRect, &rectClip);
> > +        // Make sure we have a non-empty rect
after this 
> intersection
> > +        if (!HXxRect_IsEmpty(rectClip))
> > +        {
> > +            // To put clipRect into coordinate
space of 
> the top-level site,
> > +            // we need to offset it by
m_topleft.
> > +            m_clipRect = rectClip;
> > +            HXxRect_Offset(m_clipRect,
m_topleft.x, m_topleft.y);
> > +            // Now we need to set the clipRect
into all 
> the children.
> > +            // We need to offset the input
zero-based clipRect by
> > +            // the children's position.
> >      LISTPOSITION pos =
m_ChildrenInZOrder.GetHeadPosition();
> >      while(pos)
> >      {
> >          CHXBaseSite* pSite = 
> (CHXBaseSite*)m_ChildrenInZOrder.GetNext(pos);
> > -        pSite->SetClipRect(clipRect);
> > +                if (pSite)
> > +                {
> > +                    // Get the child site's
position. This 
> is their position
> > +                    // relative to their parent.
> > +                    HXxPoint ptChild = {0, 0};
> > +                   
pSite->GetPosition(ptChild);
> > +                    // Make a copy of the input
clipRect
> > +                    HXxRect rectChildClip =
rectClip;
> > +                    // Subtract the offset of the
child 
> site from the input clipRect
> > +                    HXxRect_Offset(rectChildClip,

> -ptChild.x, -ptChild.y);
> > +                    // Now call SetClipRect on
the child. 
> Each child will
> > +                    // take care above to clip
against its 
> own rect.
> > +                   
pSite->SetClipRect(rectChildClip);
> > +                }
> > +            }
> > +        }
> >      }
> > 
> >      _TLSUnlock();
> >  -4597,25 +4638,6 
> >          if (m_pParentSite)
> >              
>
m_pParentSite->BuildParnetClipping(m_RegionWithoutChildre
n,this);
> > 
> > -        // honor the clip region if it's set and
we are 
> not in FullScreen
> > -        // this can happen when we are in
Windowless mode.
> > -        //
> > -        // whether this is a good place to do the
clipping 
> is still pending
> > -        // further investigation, but this place
is 
> working OK for now.
> > -        if (!IsFullScreen() &&
!HXxRect_IsEmpty(m_clipRect))
> > -        {
> > -            HXREGION* clipRegion = 
> HXCreateRectRegion(m_clipRect.left, m_clipRect.top,
> > -                                                 
    
> m_clipRect.right-m_clipRect.left,
> > -                                                 
    
> m_clipRect.bottom-m_clipRect.top);
> > -
> > -            if (clipRegion->numRects != 0)
> > -            {
> > -               
HXIntersectRegion(m_RegionWithoutChildren, 
> clipRegion, m_RegionWithoutChildren);
> > -            }
> > -
> > -            HXDestroyRegion(clipRegion);
> > -        }
> > -
> >          // subtract all of my children from my
clipping region
> >          m_Region = HXCreateRectRegion(0,0,0,0);
> > 
> >  -6731,7 +6753,21 
> >          m_fpTransitionEffect == FadeToColor
> >          )
> >      {
> > -        return m_fpTransitionEffect(left, top,
right, 
> bottom, completeness, m_pContext, NULL);
> > +        HXREGION* pRetRegion =
m_fpTransitionEffect(left, 
> top, right, bottom, completeness, m_pContext, NULL);
> > +        if (pRetRegion &&
!HXxRect_IsEmpty(m_clipRect))
> > +        {
> > +            // Create a region from the user-set
clip rect
> > +            HXREGION* pUserClipRegion = 
> HXCreateRectRegion(m_clipRect.left,
> > +                                                 
         
> m_clipRect.top,
> > +                                                 
         
> HXxRECT_WIDTH(m_clipRect),
> > +                                                 
         
> HXxRECT_HEIGHT(m_clipRect));
> > +            if (pUserClipRegion)
> > +            {
> > +                HXIntersectRegion(pRetRegion, 
> pUserClipRegion, pRetRegion);
> > +            }
> > +            HXDestroyRegion(pUserClipRegion);
> > +        }
> > +        return pRetRegion;
> >      }
> > 
> >      tranLines* tmpLines = (completeness > 0
&& 
> completeness < 1000) ? lines : NULL;
> >  -6761,16 +6797,24 
> >      if (!(m_bTransitionTranIn ^
m_bTransitionReversed))
> >          retRGN = InvertRGN(retRGN, left, top,
right, bottom);
> > 
> > -    //Intersect with our rect.
> > -    HXREGION* pMe = HXCreateRectRegion(
m_topleft.x,
> > +    // Create a rect of the whole site
> > +    HXxRect rectThisSite = {m_topleft.x,
> >                                         
m_topleft.y,
> > -                                       
m_size.cx,
> > -                                       
m_size.cy
> > -                                        );
> > +                            m_topleft.x +
m_size.cx,
> > +                            m_topleft.y +
m_size.cy};
> > +    if (!HXxRect_IsEmpty(m_clipRect))
> > +    {
> > +        // Intersect the clipRect with the
whole-site rect
> > +        HXxRect_Intersection(rectThisSite,
m_clipRect, 
> &rectThisSite);
> > +    }
> > +    // Create a region of our (potentially
user-clipped) site
> > +    HXREGION* pMe =
HXCreateRectRegion(rectThisSite.left,
> > +                                      
rectThisSite.top,
> > +                                      
HXxRECT_WIDTH(rectThisSite),
> > +                                       
> HXxRECT_HEIGHT(rectThisSite));
> >      HXIntersectRegion( retRGN, pMe, retRGN );
> >      HXDestroyRegion( pMe );
> > 
> > -
> >      return retRGN;
> >  }
> > 
> > 
> > =============================================
> > Eric Hyche (ehychereal.com)
> > Technical Lead
> > RealNetworks, Inc. 
> > 
> > 
> > _______________________________________________
> > Video-dev mailing list
> > Video-devhelixcommunity.org
> > http://lists.helixcommunity.org/mailman/listinfo/video
-dev
> 


_______________________________________________
Video-dev mailing list
Video-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/video
-dev

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )