|
List Info
Thread: CR-Client: fit="meetBest" support in SMIL renderer
|
|
| CR-Client: fit="meetBest"
support in SMIL renderer |
  United States |
2007-10-02 11:28:10 |
Description
----------------------------------
SMIL 2.1 introduced a new value of the "fit"
attribute:
meetBest. This attribute is similar to fit="meet",
but
never scales the media beyond 100%. This change adds
support for fit="meetBest" in the SMIL renderer.
Files Modified
----------------------------------
datatype/smil/include/smiltype.h
datatype/smil/renderer/smil2/smldoc.cpp
datatype/smil/renderer/smil2/smlparse.cpp
datatype/smil/renderer/smil2/pub/parstabl.h
datatype/smil/renderer/smil2/pub/smldoc.h
Branches
----------------------------------
HEAD only
Index: include/smiltype.h
============================================================
=======
RCS file: /cvsroot/datatype/smil/include/smiltype.h,v
retrieving revision 1.4
diff -u -w -u -w -r1.4 smiltype.h
--- include/smiltype.h 6 Jul 2007 22:01:48 -0000 1.4
+++ include/smiltype.h 2 Oct 2007 16:23:58 -0000
 -358,6
+358,7 
FitFill,
FitHidden,
FitMeet,
+ FitMeetBest,
FitScroll,
FitSlice
} Fit;
Index: renderer/smil2/smldoc.cpp
============================================================
=======
RCS file:
/cvsroot/datatype/smil/renderer/smil2/smldoc.cpp,v
retrieving revision 1.44
diff -u -w -u -w -r1.44 smldoc.cpp
--- renderer/smil2/smldoc.cpp 13 Jul 2007 02:51:57 -0000
1.44
+++ renderer/smil2/smldoc.cpp 2 Oct 2007 16:24:00 -0000

-16666,10 +16666,10 
break;
case FitMeet:
+ case FitMeetBest:
case FitSlice:
{
INT32 d = 0; // dummy variable
- HXBOOL bIsMeet = (eFit == FitMeet ?
TRUE : FALSE);
switch (eRegAlign)
{
case RegAlignTopLeft:
 -16678,7
+16678,7 
rcMediaRect.left =
cRegPoint.x;
rcMediaRect.top =
cRegPoint.y;
// compute the rest of the
media rect
-
computeMeetSliceScaling(bIsMeet, 2,
+
computeMeetSliceScaling(eFit, 2,
cRegPoint.x,
cRegPoint.x + cMediaSize.cx,
cRegionRect.right,
 -16701,7
+16701,7 
computeHalfBounds(cRegPoint.x, cMediaSize.cx,
lMediaLeft, lMediaRight);
// Compute the rest of the
media rect
-
computeMeetSliceScaling(bIsMeet, 3,
+
computeMeetSliceScaling(eFit, 3,
cRegPoint.x,
lMediaLeft,
cRegionRect.left,
 -16724,7
+16724,7 
rcMediaRect.top =
cRegPoint.y;
rcMediaRect.right =
cRegPoint.x;
// compute the rest of the
media rect
-
computeMeetSliceScaling(bIsMeet, 2,
+
computeMeetSliceScaling(eFit, 2,
cRegPoint.x,
cRegPoint.x - cMediaSize.cx,
cRegionRect.left,
 -16747,7
+16747,7 
computeHalfBounds(cRegPoint.y, cMediaSize.cy,
lMediaTop, lMediaBottom);
// compute the rest of the
media rect
-
computeMeetSliceScaling(bIsMeet, 3,
+
computeMeetSliceScaling(eFit, 3,
cRegPoint.y,
lMediaTop,
cRegionRect.top,
 -16777,7
+16777,7 
computeHalfBounds(cRegPoint.y, cMediaSize.cy,
lMediaTop, lMediaBottom);
// Compute the media rect
-
computeMeetSliceScaling(bIsMeet, 4,
+
computeMeetSliceScaling(eFit, 4,
cRegPoint.x,
lMediaLeft,
cRegionRect.left,
 -16806,7
+16806,7 
computeHalfBounds(cRegPoint.y, cMediaSize.cy,
lMediaTop, lMediaBottom);
// Compute the rest of the
media rect
-
computeMeetSliceScaling(bIsMeet, 3,
+
computeMeetSliceScaling(eFit, 3,
cRegPoint.x,
cRegPoint.x - cMediaSize.cx,
cRegionRect.left,
 -16829,7
+16829,7 
rcMediaRect.left =
cRegPoint.x;
rcMediaRect.bottom =
cRegPoint.y;
// Compute the rest of the
media rect
-
computeMeetSliceScaling(bIsMeet, 2,
+
computeMeetSliceScaling(eFit, 2,
cRegPoint.y,
cRegPoint.y - cMediaSize.cy,
cRegionRect.top,
 -16852,7
+16852,7 
computeHalfBounds(cRegPoint.x, cMediaSize.cx,
lMediaLeft, lMediaRight);
// Compute the rest of the
media rect
-
computeMeetSliceScaling(bIsMeet, 3,
+
computeMeetSliceScaling(eFit, 3,
cRegPoint.x,
lMediaLeft,
cRegionRect.left,
 -16875,7
+16875,7 
rcMediaRect.right =
cRegPoint.x;
rcMediaRect.bottom =
cRegPoint.y;
// Compute the rest of the
media rect
-
computeMeetSliceScaling(bIsMeet, 2,
+
computeMeetSliceScaling(eFit, 2,
cRegPoint.x,
cRegPoint.x - cMediaSize.cx,
cRegionRect.left,
 -16950,7
+16950,7 
}
}
-void CSmilDocumentRenderer::computeMeetSliceScaling(HXBOOL
bIsMeet, UINT32 ulNumDim,
+void CSmilDocumentRenderer::computeMeetSliceScaling(Fit
eFit, UINT32 ulNumDim,
INT32
lA1, INT32 lA2, INT32 lA3,
INT32
lB1, INT32 lB2, INT32 lB3,
INT32
lC1, INT32 lC2, INT32 lC3,
 -16967,6
+16967,7 
double dOldDiff[4] = {0.0, 0.0, 0.0, 0.0};
double dScale[4] = {0.0, 0.0, 0.0, 0.0};
UINT32 i = 0;
+ HXBOOL bIsMeet = ((eFit == FitMeet || eFit ==
FitMeetBest) ? TRUE : FALSE);
double dMinMax = (bIsMeet ? 10000000.0 : 0.0);
for (i = 0; i < ulNumDim; i++)
{
 -16985,6
+16986,15 
dMinMax = dScale[i];
}
}
+ // If this is meetBest, then we don't allow the
+ // scaling to exceed 100%.
+ if (eFit == FitMeetBest)
+ {
+ if (dMinMax > 1.0)
+ {
+ dMinMax = 1.0;
+ }
+ }
// So now we have either the minimum or maximum scale,
// so now we need to adjust all of the scales to this
scale
INT32 lOut[4] = {0, 0, 0, 0};
Index: renderer/smil2/smlparse.cpp
============================================================
=======
RCS file:
/cvsroot/datatype/smil/renderer/smil2/smlparse.cpp,v
retrieving revision 1.45
diff -u -w -u -w -r1.45 smlparse.cpp
--- renderer/smil2/smlparse.cpp 6 Jul 2007 22:01:52 -0000
1.45
+++ renderer/smil2/smlparse.cpp 2 Oct 2007 16:24:02 -0000
 -24856,6
+24856,10 
{
reValue = FitMeet;
}
+ else if (!strcmp(pszStr, "meetBest"))
+ {
+ reValue = FitMeetBest;
+ }
else if (!strcmp(pszStr, "scroll"))
{
reValue = FitScroll;
Index: renderer/smil2/pub/parstabl.h
============================================================
=======
RCS file:
/cvsroot/datatype/smil/renderer/smil2/pub/parstabl.h,v
retrieving revision 1.6
diff -u -w -u -w -r1.6 parstabl.h
--- renderer/smil2/pub/parstabl.h 6 Jul 2007 22:01:55
-0000 1.6
+++ renderer/smil2/pub/parstabl.h 2 Oct 2007 16:24:02
-0000
 -287,6
+287,7 
{SMIL2AttrFit, "fill",
FitFill},
{SMIL2AttrFit,
"hidden", FitHidden},
{SMIL2AttrFit, "meet",
FitMeet},
+ {SMIL2AttrFit,
"meetBest", FitMeetBest},
{SMIL2AttrFit,
"scroll", FitScroll},
{SMIL2AttrFit, "slice",
FitSlice},
{SMIL2AttrHigher, "stop",
HigherStop},
Index: renderer/smil2/pub/smldoc.h
============================================================
=======
RCS file:
/cvsroot/datatype/smil/renderer/smil2/pub/smldoc.h,v
retrieving revision 1.18
diff -u -w -u -w -r1.18 smldoc.h
--- renderer/smil2/pub/smldoc.h 6 Jul 2007 22:01:55 -0000
1.18
+++ renderer/smil2/pub/smldoc.h 2 Oct 2007 16:24:02 -0000
 -478,7
+478,7 
INT32
lRegionLo, INT32 lRegionHi,
REF(INT32) rlMediaLo,
REF(INT32) rlMediaHi);
- static void computeMeetSliceScaling(HXBOOL
bIsMeet, UINT32 ulNumDim,
+ static void computeMeetSliceScaling(Fit eFit,
UINT32 ulNumDim,
INT32 lA1,
INT32 lA2, INT32 lA3,
INT32 lB1,
INT32 lB2, INT32 lB3,
INT32 lC1,
INT32 lC2, INT32 lC3,
=============================================
Eric Hyche (ehyche real.com)
Technical Lead
RealNetworks, Inc.
_______________________________________________
Datatype-dev mailing list
Datatype-dev helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/da
tatype-dev
|
|
| Re: CR-Client: fit="meetBest"
support in SMIL renderer |
  United States |
2007-10-03 12:44:51 |
Looks good.
--greg.
Eric Hyche wrote:
> Description
> ----------------------------------
> SMIL 2.1 introduced a new value of the "fit"
attribute:
> meetBest. This attribute is similar to
fit="meet", but
> never scales the media beyond 100%. This change adds
> support for fit="meetBest" in the SMIL
renderer.
>
> Files Modified
> ----------------------------------
> datatype/smil/include/smiltype.h
> datatype/smil/renderer/smil2/smldoc.cpp
> datatype/smil/renderer/smil2/smlparse.cpp
> datatype/smil/renderer/smil2/pub/parstabl.h
> datatype/smil/renderer/smil2/pub/smldoc.h
>
> Branches
> ----------------------------------
> HEAD only
>
>
> Index: include/smiltype.h
>
============================================================
=======
> RCS file: /cvsroot/datatype/smil/include/smiltype.h,v
> retrieving revision 1.4
> diff -u -w -u -w -r1.4 smiltype.h
> --- include/smiltype.h 6 Jul 2007 22:01:48 -0000
1.4
> +++ include/smiltype.h 2 Oct 2007 16:23:58 -0000
>  -358,6 +358,7 
> FitFill,
> FitHidden,
> FitMeet,
> + FitMeetBest,
> FitScroll,
> FitSlice
> } Fit;
> Index: renderer/smil2/smldoc.cpp
>
============================================================
=======
> RCS file:
/cvsroot/datatype/smil/renderer/smil2/smldoc.cpp,v
> retrieving revision 1.44
> diff -u -w -u -w -r1.44 smldoc.cpp
> --- renderer/smil2/smldoc.cpp 13 Jul 2007 02:51:57
-0000 1.44
> +++ renderer/smil2/smldoc.cpp 2 Oct 2007 16:24:00
-0000
>  -16666,10 +16666,10 
> break;
>
> case FitMeet:
> + case FitMeetBest:
> case FitSlice:
> {
> INT32 d = 0; // dummy
variable
> - HXBOOL bIsMeet = (eFit == FitMeet
? TRUE : FALSE);
> switch (eRegAlign)
> {
> case RegAlignTopLeft:
>  -16678,7 +16678,7 
> rcMediaRect.left =
cRegPoint.x;
> rcMediaRect.top =
cRegPoint.y;
> // compute the rest of
the media rect
> -
computeMeetSliceScaling(bIsMeet, 2,
> +
computeMeetSliceScaling(eFit, 2,
>
cRegPoint.x,
>
cRegPoint.x + cMediaSize.cx,
>
cRegionRect.right,
>  -16701,7 +16701,7 
>
computeHalfBounds(cRegPoint.x, cMediaSize.cx,
>
lMediaLeft, lMediaRight);
> // Compute the rest of
the media rect
> -
computeMeetSliceScaling(bIsMeet, 3,
> +
computeMeetSliceScaling(eFit, 3,
>
cRegPoint.x,
>
lMediaLeft,
>
cRegionRect.left,
>  -16724,7 +16724,7 
> rcMediaRect.top =
cRegPoint.y;
> rcMediaRect.right =
cRegPoint.x;
> // compute the rest of
the media rect
> -
computeMeetSliceScaling(bIsMeet, 2,
> +
computeMeetSliceScaling(eFit, 2,
>
cRegPoint.x,
>
cRegPoint.x - cMediaSize.cx,
>
cRegionRect.left,
>  -16747,7 +16747,7 
>
computeHalfBounds(cRegPoint.y, cMediaSize.cy,
>
lMediaTop, lMediaBottom);
> // compute the rest of
the media rect
> -
computeMeetSliceScaling(bIsMeet, 3,
> +
computeMeetSliceScaling(eFit, 3,
>
cRegPoint.y,
>
lMediaTop,
>
cRegionRect.top,
>  -16777,7 +16777,7 
>
computeHalfBounds(cRegPoint.y, cMediaSize.cy,
>
lMediaTop, lMediaBottom);
> // Compute the media
rect
> -
computeMeetSliceScaling(bIsMeet, 4,
> +
computeMeetSliceScaling(eFit, 4,
>
cRegPoint.x,
>
lMediaLeft,
>
cRegionRect.left,
>  -16806,7 +16806,7 
>
computeHalfBounds(cRegPoint.y, cMediaSize.cy,
>
lMediaTop, lMediaBottom);
> // Compute the rest of
the media rect
> -
computeMeetSliceScaling(bIsMeet, 3,
> +
computeMeetSliceScaling(eFit, 3,
>
cRegPoint.x,
>
cRegPoint.x - cMediaSize.cx,
>
cRegionRect.left,
>  -16829,7 +16829,7 
> rcMediaRect.left =
cRegPoint.x;
> rcMediaRect.bottom =
cRegPoint.y;
> // Compute the rest of
the media rect
> -
computeMeetSliceScaling(bIsMeet, 2,
> +
computeMeetSliceScaling(eFit, 2,
>
cRegPoint.y,
>
cRegPoint.y - cMediaSize.cy,
>
cRegionRect.top,
>  -16852,7 +16852,7 
>
computeHalfBounds(cRegPoint.x, cMediaSize.cx,
>
lMediaLeft, lMediaRight);
> // Compute the rest of
the media rect
> -
computeMeetSliceScaling(bIsMeet, 3,
> +
computeMeetSliceScaling(eFit, 3,
>
cRegPoint.x,
>
lMediaLeft,
>
cRegionRect.left,
>  -16875,7 +16875,7 
> rcMediaRect.right =
cRegPoint.x;
> rcMediaRect.bottom =
cRegPoint.y;
> // Compute the rest of
the media rect
> -
computeMeetSliceScaling(bIsMeet, 2,
> +
computeMeetSliceScaling(eFit, 2,
>
cRegPoint.x,
>
cRegPoint.x - cMediaSize.cx,
>
cRegionRect.left,
>  -16950,7 +16950,7 
> }
> }
>
> -void
CSmilDocumentRenderer::computeMeetSliceScaling(HXBOOL
bIsMeet, UINT32 ulNumDim,
> +void
CSmilDocumentRenderer::computeMeetSliceScaling(Fit eFit,
UINT32 ulNumDim,
>
INT32 lA1, INT32 lA2, INT32 lA3,
>
INT32 lB1, INT32 lB2, INT32 lB3,
>
INT32 lC1, INT32 lC2, INT32 lC3,
>  -16967,6 +16967,7 
> double dOldDiff[4] = {0.0, 0.0, 0.0, 0.0};
> double dScale[4] = {0.0, 0.0, 0.0, 0.0};
> UINT32 i = 0;
> + HXBOOL bIsMeet = ((eFit == FitMeet || eFit ==
FitMeetBest) ? TRUE : FALSE);
> double dMinMax = (bIsMeet ? 10000000.0 :
0.0);
> for (i = 0; i < ulNumDim; i++)
> {
>  -16985,6 +16986,15 
> dMinMax = dScale[i];
> }
> }
> + // If this is meetBest, then we don't allow the
> + // scaling to exceed 100%.
> + if (eFit == FitMeetBest)
> + {
> + if (dMinMax > 1.0)
> + {
> + dMinMax = 1.0;
> + }
> + }
> // So now we have either the minimum or maximum
scale,
> // so now we need to adjust all of the scales to
this scale
> INT32 lOut[4] = {0, 0, 0, 0};
> Index: renderer/smil2/smlparse.cpp
>
============================================================
=======
> RCS file:
/cvsroot/datatype/smil/renderer/smil2/smlparse.cpp,v
> retrieving revision 1.45
> diff -u -w -u -w -r1.45 smlparse.cpp
> --- renderer/smil2/smlparse.cpp 6 Jul 2007 22:01:52
-0000 1.45
> +++ renderer/smil2/smlparse.cpp 2 Oct 2007 16:24:02
-0000
>  -24856,6 +24856,10 
> {
> reValue = FitMeet;
> }
> + else if (!strcmp(pszStr,
"meetBest"))
> + {
> + reValue = FitMeetBest;
> + }
> else if (!strcmp(pszStr, "scroll"))
> {
> reValue = FitScroll;
> Index: renderer/smil2/pub/parstabl.h
>
============================================================
=======
> RCS file:
/cvsroot/datatype/smil/renderer/smil2/pub/parstabl.h,v
> retrieving revision 1.6
> diff -u -w -u -w -r1.6 parstabl.h
> --- renderer/smil2/pub/parstabl.h 6 Jul 2007
22:01:55 -0000 1.6
> +++ renderer/smil2/pub/parstabl.h 2 Oct 2007
16:24:02 -0000
>  -287,6 +287,7 
> {SMIL2AttrFit,
"fill", FitFill},
> {SMIL2AttrFit,
"hidden", FitHidden},
> {SMIL2AttrFit,
"meet", FitMeet},
> + {SMIL2AttrFit,
"meetBest", FitMeetBest},
> {SMIL2AttrFit,
"scroll", FitScroll},
> {SMIL2AttrFit,
"slice", FitSlice},
> {SMIL2AttrHigher,
"stop", HigherStop},
> Index: renderer/smil2/pub/smldoc.h
>
============================================================
=======
> RCS file:
/cvsroot/datatype/smil/renderer/smil2/pub/smldoc.h,v
> retrieving revision 1.18
> diff -u -w -u -w -r1.18 smldoc.h
> --- renderer/smil2/pub/smldoc.h 6 Jul 2007 22:01:55
-0000 1.18
> +++ renderer/smil2/pub/smldoc.h 2 Oct 2007 16:24:02
-0000
>  -478,7 +478,7 
>
INT32 lRegionLo, INT32 lRegionHi,
>
REF(INT32) rlMediaLo,
>
REF(INT32) rlMediaHi);
> - static void
computeMeetSliceScaling(HXBOOL bIsMeet, UINT32 ulNumDim,
> + static void computeMeetSliceScaling(Fit
eFit, UINT32 ulNumDim,
> INT32
lA1, INT32 lA2, INT32 lA3,
> INT32
lB1, INT32 lB2, INT32 lB3,
> INT32
lC1, INT32 lC2, INT32 lC3,
>
>
> =============================================
> Eric Hyche (ehyche real.com)
> Technical Lead
> RealNetworks, Inc.
>
>
> _______________________________________________
> Datatype-dev mailing list
> Datatype-dev helixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/da
tatype-dev
_______________________________________________
Datatype-dev mailing list
Datatype-dev helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/da
tatype-dev
|
|
| CN-Client: fit="meetBest"
support in SMIL renderer |
  United States |
2007-10-04 10:23:28 |
This is now checked into HEAD.
=============================================
Eric Hyche (ehyche real.com)
Technical Lead
RealNetworks, Inc.
> -----Original Message-----
> From: Greg Wright [mailto:gwright real.com]
> Sent: Wednesday, October 03, 2007 1:45 PM
> To: ehyche real.com
> Cc: datatype-dev lists.helixcommunity.org
> Subject: Re: [datatype-dev] CR-Client:
fit="meetBest" support
> in SMIL renderer
>
> Looks good.
>
> --greg.
>
>
> Eric Hyche wrote:
> > Description
> > ----------------------------------
> > SMIL 2.1 introduced a new value of the
"fit" attribute:
> > meetBest. This attribute is similar to
fit="meet", but
> > never scales the media beyond 100%. This change
adds
> > support for fit="meetBest" in the SMIL
renderer.
> >
> > Files Modified
> > ----------------------------------
> > datatype/smil/include/smiltype.h
> > datatype/smil/renderer/smil2/smldoc.cpp
> > datatype/smil/renderer/smil2/smlparse.cpp
> > datatype/smil/renderer/smil2/pub/parstabl.h
> > datatype/smil/renderer/smil2/pub/smldoc.h
> >
> > Branches
> > ----------------------------------
> > HEAD only
> >
> >
> > Index: include/smiltype.h
> >
============================================================
=======
> > RCS file:
/cvsroot/datatype/smil/include/smiltype.h,v
> > retrieving revision 1.4
> > diff -u -w -u -w -r1.4 smiltype.h
> > --- include/smiltype.h 6 Jul 2007 22:01:48 -0000
1.4
> > +++ include/smiltype.h 2 Oct 2007 16:23:58 -0000
> >  -358,6 +358,7 
> > FitFill,
> > FitHidden,
> > FitMeet,
> > + FitMeetBest,
> > FitScroll,
> > FitSlice
> > } Fit;
> > Index: renderer/smil2/smldoc.cpp
> >
============================================================
=======
> > RCS file:
/cvsroot/datatype/smil/renderer/smil2/smldoc.cpp,v
> > retrieving revision 1.44
> > diff -u -w -u -w -r1.44 smldoc.cpp
> > --- renderer/smil2/smldoc.cpp 13 Jul 2007
02:51:57 -0000 1.44
> > +++ renderer/smil2/smldoc.cpp 2 Oct 2007
16:24:00 -0000
> >  -16666,10 +16666,10 
> > break;
> >
> > case FitMeet:
> > + case FitMeetBest:
> > case FitSlice:
> > {
> > INT32 d = 0; // dummy
variable
> > - HXBOOL bIsMeet = (eFit ==
FitMeet ?
> TRUE : FALSE);
> > switch (eRegAlign)
> > {
> > case RegAlignTopLeft:
> >  -16678,7 +16678,7 
> > rcMediaRect.left
= cRegPoint.x;
> > rcMediaRect.top
= cRegPoint.y;
> > // compute the
rest of the
> media rect
> > -
computeMeetSliceScaling(bIsMeet, 2,
> > +
computeMeetSliceScaling(eFit, 2,
> >
> cRegPoint.x,
> >
> cRegPoint.x + cMediaSize.cx,
> >
> cRegionRect.right,
> >  -16701,7 +16701,7 
> >
> computeHalfBounds(cRegPoint.x, cMediaSize.cx,
> >
> lMediaLeft, lMediaRight);
> > // Compute the
rest of the
> media rect
> > -
computeMeetSliceScaling(bIsMeet, 3,
> > +
computeMeetSliceScaling(eFit, 3,
> >
> cRegPoint.x,
> >
lMediaLeft,
> >
> cRegionRect.left,
> >  -16724,7 +16724,7 
> > rcMediaRect.top
= cRegPoint.y;
> > rcMediaRect.right
= cRegPoint.x;
> > // compute the
rest of the
> media rect
> > -
computeMeetSliceScaling(bIsMeet, 2,
> > +
computeMeetSliceScaling(eFit, 2,
> >
> cRegPoint.x,
> >
> cRegPoint.x - cMediaSize.cx,
> >
> cRegionRect.left,
> >  -16747,7 +16747,7 
> >
> computeHalfBounds(cRegPoint.y, cMediaSize.cy,
> >
> lMediaTop, lMediaBottom);
> > // compute the
rest of the
> media rect
> > -
computeMeetSliceScaling(bIsMeet, 3,
> > +
computeMeetSliceScaling(eFit, 3,
> >
> cRegPoint.y,
> >
lMediaTop,
> >
> cRegionRect.top,
> >  -16777,7 +16777,7 
> >
> computeHalfBounds(cRegPoint.y, cMediaSize.cy,
> >
> lMediaTop, lMediaBottom);
> > // Compute the
media rect
> > -
computeMeetSliceScaling(bIsMeet, 4,
> > +
computeMeetSliceScaling(eFit, 4,
> >
> cRegPoint.x,
> >
lMediaLeft,
> >
> cRegionRect.left,
> >  -16806,7 +16806,7 
> >
> computeHalfBounds(cRegPoint.y, cMediaSize.cy,
> >
> lMediaTop, lMediaBottom);
> > // Compute the
rest of the
> media rect
> > -
computeMeetSliceScaling(bIsMeet, 3,
> > +
computeMeetSliceScaling(eFit, 3,
> >
> cRegPoint.x,
> >
> cRegPoint.x - cMediaSize.cx,
> >
> cRegionRect.left,
> >  -16829,7 +16829,7 
> > rcMediaRect.left
= cRegPoint.x;
> >
rcMediaRect.bottom = cRegPoint.y;
> > // Compute the
rest of the
> media rect
> > -
computeMeetSliceScaling(bIsMeet, 2,
> > +
computeMeetSliceScaling(eFit, 2,
> >
> cRegPoint.y,
> >
> cRegPoint.y - cMediaSize.cy,
> >
> cRegionRect.top,
> >  -16852,7 +16852,7 
> >
> computeHalfBounds(cRegPoint.x, cMediaSize.cx,
> >
> lMediaLeft, lMediaRight);
> > // Compute the
rest of the
> media rect
> > -
computeMeetSliceScaling(bIsMeet, 3,
> > +
computeMeetSliceScaling(eFit, 3,
> >
> cRegPoint.x,
> >
lMediaLeft,
> >
> cRegionRect.left,
> >  -16875,7 +16875,7 
> > rcMediaRect.right
= cRegPoint.x;
> >
rcMediaRect.bottom = cRegPoint.y;
> > // Compute the
rest of the
> media rect
> > -
computeMeetSliceScaling(bIsMeet, 2,
> > +
computeMeetSliceScaling(eFit, 2,
> >
> cRegPoint.x,
> >
> cRegPoint.x - cMediaSize.cx,
> >
> cRegionRect.left,
> >  -16950,7 +16950,7 
> > }
> > }
> >
> > -void
CSmilDocumentRenderer::computeMeetSliceScaling(HXBOOL
> bIsMeet, UINT32 ulNumDim,
> > +void
CSmilDocumentRenderer::computeMeetSliceScaling(Fit
> eFit, UINT32 ulNumDim,
> >
INT32
> lA1, INT32 lA2, INT32 lA3,
> >
INT32
> lB1, INT32 lB2, INT32 lB3,
> >
INT32
> lC1, INT32 lC2, INT32 lC3,
> >  -16967,6 +16967,7 
> > double dOldDiff[4] = {0.0, 0.0, 0.0, 0.0};
> > double dScale[4] = {0.0, 0.0, 0.0, 0.0};
> > UINT32 i = 0;
> > + HXBOOL bIsMeet = ((eFit == FitMeet ||
eFit ==
> FitMeetBest) ? TRUE : FALSE);
> > double dMinMax = (bIsMeet ? 10000000.0 :
0.0);
> > for (i = 0; i < ulNumDim; i++)
> > {
> >  -16985,6 +16986,15 
> > dMinMax = dScale[i];
> > }
> > }
> > + // If this is meetBest, then we don't allow
the
> > + // scaling to exceed 100%.
> > + if (eFit == FitMeetBest)
> > + {
> > + if (dMinMax > 1.0)
> > + {
> > + dMinMax = 1.0;
> > + }
> > + }
> > // So now we have either the minimum or
maximum scale,
> > // so now we need to adjust all of the scales
to this scale
> > INT32 lOut[4] = {0, 0, 0, 0};
> > Index: renderer/smil2/smlparse.cpp
> >
============================================================
=======
> > RCS file:
/cvsroot/datatype/smil/renderer/smil2/smlparse.cpp,v
> > retrieving revision 1.45
> > diff -u -w -u -w -r1.45 smlparse.cpp
> > --- renderer/smil2/smlparse.cpp 6 Jul 2007
22:01:52 -0000 1.45
> > +++ renderer/smil2/smlparse.cpp 2 Oct 2007
16:24:02 -0000
> >  -24856,6 +24856,10 
> > {
> > reValue = FitMeet;
> > }
> > + else if (!strcmp(pszStr,
"meetBest"))
> > + {
> > + reValue = FitMeetBest;
> > + }
> > else if (!strcmp(pszStr,
"scroll"))
> > {
> > reValue = FitScroll;
> > Index: renderer/smil2/pub/parstabl.h
> >
============================================================
=======
> > RCS file:
/cvsroot/datatype/smil/renderer/smil2/pub/parstabl.h,v
> > retrieving revision 1.6
> > diff -u -w -u -w -r1.6 parstabl.h
> > --- renderer/smil2/pub/parstabl.h 6 Jul 2007
22:01:55
> -0000 1.6
> > +++ renderer/smil2/pub/parstabl.h 2 Oct 2007
16:24:02 -0000
> >  -287,6 +287,7 
> > {SMIL2AttrFit,
"fill",
> FitFill},
> > {SMIL2AttrFit,
"hidden",
> FitHidden},
> > {SMIL2AttrFit,
"meet",
> FitMeet},
> > + {SMIL2AttrFit,
"meetBest",
> FitMeetBest},
> > {SMIL2AttrFit,
"scroll",
> FitScroll},
> > {SMIL2AttrFit,
"slice",
> FitSlice},
> > {SMIL2AttrHigher,
"stop",
> HigherStop},
> > Index: renderer/smil2/pub/smldoc.h
> >
============================================================
=======
> > RCS file:
/cvsroot/datatype/smil/renderer/smil2/pub/smldoc.h,v
> > retrieving revision 1.18
> > diff -u -w -u -w -r1.18 smldoc.h
> > --- renderer/smil2/pub/smldoc.h 6 Jul 2007
22:01:55 -0000 1.18
> > +++ renderer/smil2/pub/smldoc.h 2 Oct 2007
16:24:02 -0000
> >  -478,7 +478,7 
> >
INT32
> lRegionLo, INT32 lRegionHi,
> >
> REF(INT32) rlMediaLo,
> >
> REF(INT32) rlMediaHi);
> > - static void
computeMeetSliceScaling(HXBOOL
> bIsMeet, UINT32 ulNumDim,
> > + static void
computeMeetSliceScaling(Fit eFit,
> UINT32 ulNumDim,
> >
INT32
> lA1, INT32 lA2, INT32 lA3,
> >
INT32
> lB1, INT32 lB2, INT32 lB3,
> >
INT32
> lC1, INT32 lC2, INT32 lC3,
> >
> >
> > =============================================
> > Eric Hyche (ehyche real.com)
> > Technical Lead
> > RealNetworks, Inc.
> >
> >
> > _______________________________________________
> > Datatype-dev mailing list
> > Datatype-dev helixcommunity.org
> > http://lists.helixcommunity.org/mailman/listinfo/da
tatype-dev
>
_______________________________________________
Datatype-dev mailing list
Datatype-dev helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/da
tatype-dev
|
|
[1-3]
|
|