diff options
35 files changed, 1441 insertions, 569 deletions
diff --git a/goodies/inc/goodies.hrc b/goodies/inc/goodies.hrc index 5a9557380efc..48274a5c5343 100644 --- a/goodies/inc/goodies.hrc +++ b/goodies/inc/goodies.hrc @@ -2,9 +2,9 @@ * * $RCSfile: goodies.hrc,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: ka $ $Date: 2001-11-26 10:41:53 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,6 +86,6 @@ #define PAGE_SSL_NEWCERT_READYCERT (RID_GOODIES_START+ 18) #define WIN_SSL_INFCERT (RID_GOODIES_START+ 19) #define WIN_SSL_INFCERT_EDIT (RID_GOODIES_START+ 20) -#define DLG_EXPORT_J2K (RID_GOODIES_START+ 21) #endif + diff --git a/goodies/inc/grfmgr.hxx b/goodies/inc/grfmgr.hxx index 53166fb90a2b..26264c03264a 100644 --- a/goodies/inc/grfmgr.hxx +++ b/goodies/inc/grfmgr.hxx @@ -2,9 +2,9 @@ * * $RCSfile: grfmgr.hxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: thb $ $Date: 2002-10-24 17:19:52 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -74,6 +74,8 @@ #define GRFMGR_DRAW_CACHED 0x00000001UL #define GRFMGR_DRAW_BILINEAR 0x00000002UL #define GRFMGR_DRAW_USE_DRAWMODE_SETTINGS 0x00000004UL +#define GRFMGR_DRAW_SUBSTITUTE 0x00000008UL +#define GRFMGR_DRAW_NO_SUBSTITUTE 0x00000010UL #define GRFMGR_DRAW_STANDARD (GRFMGR_DRAW_CACHED|GRFMGR_DRAW_BILINEAR) // -------------------- @@ -117,7 +119,9 @@ class GraphicManager; class SvStream; class BitmapWriteAccess; class GraphicCache; +class VirtualDevice; struct GrfSimpleCacheObj; +struct ImplTileInfo; // --------------- // - GraphicAttr - @@ -263,7 +267,63 @@ private: BOOL ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr, PolyPolygon& rClipPolyPoly, BOOL& bRectClipRegion ) const; - BOOL ImplDrawTiled( OutputDevice& rOut, const Point& rPos, + /** Render a given number of tiles in an optimized way + + This method recursively subdivides the tile rendering problem + in smaller parts, i.e. rendering output size x with few tiles + of size y, which in turn are generated from the original + bitmap in a recursive fashion. The subdivision size can be + controlled by the exponent argument, which specifies the + minimal number of smaller tiles used in one recursion + step. The resulting tile size is given as the integer number + of repetitions of the original bitmap along x and y. As the + exponent need not necessarily divide these numbers without + remainder, the repetition counts are effectively converted to + base-exponent numbers, where each place denotes the number of + times the corresponding tile size is rendered. + + @param rVDev + Virtual device to render everything into + + @param nExponent + Number of repetitions per subdivision step, _must_ be greater than 1 + + @param nNumTilesX + Number of original tiles to generate in x direction + + @param nNumTilesY + Number of original tiles to generate in y direction + + @param rTileSizePixel + Size in pixel of the original tile bitmap to render it in + + @param pAttr + Graphic attributes to be used for rendering + + @param nFlags + Graphic flags to be used for rendering + + @param rCurrPos + Current output point for this recursion level (should start with (0,0)) + + @return true, if everything was successfully rendered. + */ + bool ImplRenderTempTile( VirtualDevice& rVDev, int nExponent, + int nNumTilesX, int nNumTilesY, + const Size& rTileSizePixel, + const GraphicAttr* pAttr, ULONG nFlags ); + + /// internally called by ImplRenderTempTile() + bool ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent, int nMSBFactor, + int nNumOrigTilesX, int nNumOrigTilesY, + int nRemainderTilesX, int nRemainderTilesY, + const Size& rTileSizePixel, const GraphicAttr* pAttr, + ULONG nFlags, ImplTileInfo& rTileInfo ); + + bool ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSizePixel, + const Size& rOffset, const GraphicAttr* pAttr, ULONG nFlags, int nTileCacheSize1D ); + + bool ImplDrawTiled( OutputDevice& rOut, const Point& rPos, int nNumTilesX, int nNumTilesY, const Size& rTileSize, const GraphicAttr* pAttr, ULONG nFlags ); @@ -319,7 +379,33 @@ public: void SetGraphic( const Graphic& rGraphic ); void SetGraphic( const Graphic& rGraphic, const String& rLink ); - Graphic GetTransformedGraphic( const GraphicAttr* pAttr = NULL ) const; + /** Get graphic transformed according to given attributes + + This method returns a Graphic transformed, cropped and scaled + to the given parameters, ready to be rendered to printer or + display. The returned graphic has the same visual appearance + as if it had been drawn via GraphicObject::Draw() to a + specific output device. + + @param rDestSize + Desired output size in logical coordinates. The mapmode to + interpret these logical coordinates in is given by the second + parameter, rDestMap. + + @param rDestMap + Mapmode the output should be interpreted in. This is used to + interpret rDestSize, to set the appropriate PrefMapMode on the + returned Graphic, and to deal correctly with metafile graphics. + + @param rAttr + Graphic attributes used to transform the graphic. This + includes cropping, rotation, mirroring, and various color + adjustment parameters. + + @return the readily transformed Graphic + */ + Graphic GetTransformedGraphic( const Size& rDestSize, const MapMode& rDestMap, const GraphicAttr& rAttr ) const; + Graphic GetTransformedGraphic( const GraphicAttr* pAttr = NULL ) const; // TODO: Change to Impl void SetAttr( const GraphicAttr& rAttr ); const GraphicAttr& GetAttr() const { return maAttr; } @@ -387,10 +473,19 @@ public: @param nFlags Optional rendering flags + @param nTileCacheSize1D + Optional dimension of the generated cache tiles. The pOut sees + a number of tile draws, which have approximately + nTileCacheSize1D times nTileCacheSize1D bitmap sizes if the + tile bitmap is smaller. Otherwise, the tile is drawn as + is. This is useful if e.g. you want only a few, very large + bitmap drawings appear on the outdev. + @return TRUE, if drawing completed successfully */ BOOL DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize, - const Size& rOffset, const GraphicAttr* pAttr = NULL, ULONG nFlags = GRFMGR_DRAW_STANDARD ); + const Size& rOffset, const GraphicAttr* pAttr = NULL, + ULONG nFlags = GRFMGR_DRAW_STANDARD, int nTileCacheSize1D=128 ); BOOL StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz, long nExtraData = 0L, const GraphicAttr* pAttr = NULL, ULONG nFlags = GRFMGR_DRAW_STANDARD, diff --git a/goodies/source/base3d/b3ddeflt.cxx b/goodies/source/base3d/b3ddeflt.cxx index 2a691a73050b..63e296e1b59a 100644 --- a/goodies/source/base3d/b3ddeflt.cxx +++ b/goodies/source/base3d/b3ddeflt.cxx @@ -2,9 +2,9 @@ * * $RCSfile: b3ddeflt.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: aw $ $Date: 2001-06-06 09:01:44 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -102,6 +102,10 @@ Base3DDefault::Base3DDefault(OutputDevice* pOutDev) fDetail(1.0), bReducedDetail(FALSE), bDetailBackedup(FALSE), + + // #96837# + mbPTCorrection(sal_True), + fDetailBackup( -1.0 ), nMaxPixels(500000) { @@ -739,6 +743,7 @@ void Base3DDefault::Clipped3DLine(UINT32 nInd1, UINT32 nInd2) rEntity1.TexCoor().X() * fTexWidth, rEntity2.TexCoor().X() * fTexWidth, nCount); + aIntTexTLine.Load( rEntity1.TexCoor().Y() * fTexHeight, rEntity2.TexCoor().Y() * fTexHeight, @@ -964,6 +969,7 @@ void Base3DDefault::Clipped3DTriangle(UINT32 nInd1, UINT32 nInd2, UINT32 nInd3) B3dEntity& rEntity1 = aBuffers[nInd1]; B3dEntity& rEntity2 = aBuffers[nInd2]; B3dEntity& rEntity3 = aBuffers[nInd3]; + bNormalsUsed = rEntity1.IsNormalUsed() && rEntity2.IsNormalUsed() && rEntity3.IsNormalUsed(); bTextureUsed = IsTextureActive() && rEntity1.IsTexCoorUsed() && rEntity2.IsTexCoorUsed() && rEntity3.IsTexCoorUsed(); Base3DMaterialMode eMode = Base3DMaterialFront; @@ -986,13 +992,21 @@ void Base3DDefault::Clipped3DTriangle(UINT32 nInd1, UINT32 nInd2, UINT32 nInd3) rEntity1.Color() = SolveColorModel( GetMaterialObject(eMode), - rEntity1.Normal(), rEntity1.Point().GetVector3D()); + rEntity1.Normal(), + rEntity1.Point().GetVector3D() + ); + rEntity2.Color() = SolveColorModel( GetMaterialObject(eMode), - rEntity2.Normal(), rEntity2.Point().GetVector3D()); + rEntity2.Normal(), + rEntity2.Point().GetVector3D() + ); + rEntity3.Color() = SolveColorModel( GetMaterialObject(eMode), - rEntity3.Normal(), rEntity3.Point().GetVector3D()); + rEntity3.Normal(), + rEntity3.Point().GetVector3D() + ); // Die Normalen NICHT ungueltig machen, da die Entities // eventuell noch fuer weitere Primitive benutzt werden. @@ -1089,24 +1103,68 @@ void Base3DDefault::Clipped3DTriangle(UINT32 nInd1, UINT32 nInd2, UINT32 nInd3) // YStart, Links und rechts laden nYLine = aOutPointTop.Y(); + aIntXPosLeft.Load(aOutPointTop.X(), aOutPointLeft.X(), nDeltaYLeft); aIntDepthLeft.Load(pEntTop->Point().Z(), pEntLeft->Point().Z(), nDeltaYLeft); + aIntXPosRight.Load(aOutPointTop.X(), aOutPointRight.X(), nDeltaYRight); aIntDepthRight.Load(pEntTop->Point().Z(), pEntRight->Point().Z(), nDeltaYRight); + if(bTextureUsed) { - aIntTexSLeft.Load( - pEntTop->TexCoor().X() * fTexWidth, - pEntLeft->TexCoor().X() * fTexWidth, nDeltaYLeft); - aIntTexTLeft.Load( - pEntTop->TexCoor().Y() * fTexHeight, - pEntLeft->TexCoor().Y() * fTexHeight, nDeltaYLeft); - aIntTexSRight.Load( - pEntTop->TexCoor().X() * fTexWidth, - pEntRight->TexCoor().X() * fTexWidth, nDeltaYRight); - aIntTexTRight.Load( - pEntTop->TexCoor().Y() * fTexHeight, - pEntRight->TexCoor().Y() * fTexHeight, nDeltaYRight); + // #96837# + if(mbPTCorrection) + { + // Load real depth interpolators (if needed) + const double fRealDepthLeft(1.0 / GetTransformationSet()->ViewToEyeCoor(pEntLeft->Point().GetVector3D()).Z()); + const double fRealDepthRight(1.0 / GetTransformationSet()->ViewToEyeCoor(pEntRight->Point().GetVector3D()).Z()); + const double fRealDepthTop(1.0 / GetTransformationSet()->ViewToEyeCoor(pEntTop->Point().GetVector3D()).Z()); + aRealDepthLeft.Load(fRealDepthTop, fRealDepthLeft, nDeltaYLeft); + aRealDepthRight.Load(fRealDepthTop, fRealDepthRight, nDeltaYRight); + + // #96837# + aIntTexSLeft.Load( + pEntTop->TexCoor().X() * fTexWidth * fRealDepthTop, + pEntLeft->TexCoor().X() * fTexWidth * fRealDepthLeft, + nDeltaYLeft); + + aIntTexTLeft.Load( + pEntTop->TexCoor().Y() * fTexHeight * fRealDepthTop, + pEntLeft->TexCoor().Y() * fTexHeight * fRealDepthLeft, + nDeltaYLeft); + + aIntTexSRight.Load( + pEntTop->TexCoor().X() * fTexWidth * fRealDepthTop, + pEntRight->TexCoor().X() * fTexWidth * fRealDepthRight, + nDeltaYRight); + + aIntTexTRight.Load( + pEntTop->TexCoor().Y() * fTexHeight * fRealDepthTop, + pEntRight->TexCoor().Y() * fTexHeight * fRealDepthRight, + nDeltaYRight); + } + else + { + aIntTexSLeft.Load( + pEntTop->TexCoor().X() * fTexWidth, + pEntLeft->TexCoor().X() * fTexWidth, + nDeltaYLeft); + + aIntTexTLeft.Load( + pEntTop->TexCoor().Y() * fTexHeight, + pEntLeft->TexCoor().Y() * fTexHeight, + nDeltaYLeft); + + aIntTexSRight.Load( + pEntTop->TexCoor().X() * fTexWidth, + pEntRight->TexCoor().X() * fTexWidth, + nDeltaYRight); + + aIntTexTRight.Load( + pEntTop->TexCoor().Y() * fTexHeight, + pEntRight->TexCoor().Y() * fTexHeight, + nDeltaYRight); + } } if(bNormalsUsed && GetShadeModel() == Base3DPhong) @@ -1399,13 +1457,15 @@ void Base3DDefault::DrawLinePhongTexture(long nYPos, B3dMaterial& rMat) aIntVectorLine.Load(aVectorLeft, aVectorRight, nXLineDelta); aIntDepthLine.Load(aIntDepthLeft.GetDoubleValue(), aIntDepthRight.GetDoubleValue(), nXLineDelta); - // Texturkoordinateninterpolation? - if(bTextureUsed) + // #96837## + if(mbPTCorrection) { - aIntTexSLine.Load(aIntTexSLeft.GetDoubleValue(), aIntTexSRight.GetDoubleValue(), nXLineDelta); - aIntTexTLine.Load(aIntTexTLeft.GetDoubleValue(), aIntTexTRight.GetDoubleValue(), nXLineDelta); + aRealDepthLine.Load(aRealDepthLeft.GetDoubleValue(), aRealDepthRight.GetDoubleValue(), nXLineDelta); } + aIntTexSLine.Load(aIntTexSLeft.GetDoubleValue(), aIntTexSRight.GetDoubleValue(), nXLineDelta); + aIntTexTLine.Load(aIntTexTLeft.GetDoubleValue(), aIntTexTRight.GetDoubleValue(), nXLineDelta); + if(GetTransformationSet()) { Vector3D aInvTrans = GetTransformationSet()->GetTranslate(); @@ -1428,13 +1488,24 @@ void Base3DDefault::DrawLinePhongTexture(long nYPos, B3dMaterial& rMat) aNormal.Normalize(); Color aCol = SolveColorModel(rMat, aNormal, aPoint); - // Texturkoordinateninterpolation? - if(bTextureUsed) + // #96837# + if(mbPTCorrection) + { + GetActiveTexture()->ModifyColor( + aCol, + aIntTexSLine.GetDoubleValue() / aRealDepthLine.GetDoubleValue(), + aIntTexTLine.GetDoubleValue() / aRealDepthLine.GetDoubleValue() + ); + } + else { - GetActiveTexture()->ModifyColor(aCol, + GetActiveTexture()->ModifyColor( + aCol, aIntTexSLine.GetDoubleValue(), - aIntTexTLine.GetDoubleValue()); + aIntTexTLine.GetDoubleValue() + ); } + WritePixel(nXLineStart, nYPos, aCol, nDepth); } @@ -1447,12 +1518,14 @@ void Base3DDefault::DrawLinePhongTexture(long nYPos, B3dMaterial& rMat) aIntDepthLine.Increment(); aIntVectorLine.Increment(); - // Texturkoordinateninterpolation? - if(bTextureUsed) + // #96837# + if(mbPTCorrection) { - aIntTexSLine.Increment(); - aIntTexTLine.Increment(); + aRealDepthLine.Increment(); } + + aIntTexSLine.Increment(); + aIntTexTLine.Increment(); } } } @@ -1548,6 +1621,12 @@ void Base3DDefault::DrawLineColorTexture(long nYPos) aIntTexTLine.Load(aIntTexTLeft.GetDoubleValue(), aIntTexTRight.GetDoubleValue(), nXLineDelta); aIntDepthLine.Load(aIntDepthLeft.GetDoubleValue(), aIntDepthRight.GetDoubleValue(), nXLineDelta); + // #96837# + if(mbPTCorrection) + { + aRealDepthLine.Load(aRealDepthLeft.GetDoubleValue(), aRealDepthRight.GetDoubleValue(), nXLineDelta); + } + while(nXLineDelta--) { // Werte vorbereiten @@ -1557,9 +1636,25 @@ void Base3DDefault::DrawLineColorTexture(long nYPos) if(IsVisibleAndScissor(nXLineStart, nYPos, nDepth)) { Color aCol = aIntColorLine.GetColorValue(); - GetActiveTexture()->ModifyColor(aCol, - aIntTexSLine.GetDoubleValue(), - aIntTexTLine.GetDoubleValue()); + + // #96837# + if(mbPTCorrection) + { + GetActiveTexture()->ModifyColor( + aCol, + aIntTexSLine.GetDoubleValue() / aRealDepthLine.GetDoubleValue(), + aIntTexTLine.GetDoubleValue() / aRealDepthLine.GetDoubleValue() + ); + } + else + { + GetActiveTexture()->ModifyColor( + aCol, + aIntTexSLine.GetDoubleValue(), + aIntTexTLine.GetDoubleValue() + ); + } + WritePixel(nXLineStart, nYPos, aCol, nDepth); } @@ -1573,6 +1668,12 @@ void Base3DDefault::DrawLineColorTexture(long nYPos) aIntColorLine.Increment(); aIntTexSLine.Increment(); aIntTexTLine.Increment(); + + // #96837# + if(mbPTCorrection) + { + aRealDepthLine.Increment(); + } } } } @@ -1647,6 +1748,12 @@ void Base3DDefault::DrawLineTexture(long nYPos, Color& rCol) aIntTexTLine.Load(aIntTexTLeft.GetDoubleValue(), aIntTexTRight.GetDoubleValue(), nXLineDelta); aIntDepthLine.Load(aIntDepthLeft.GetDoubleValue(), aIntDepthRight.GetDoubleValue(), nXLineDelta); + // #96837# + if(mbPTCorrection) + { + aRealDepthLine.Load(aRealDepthLeft.GetDoubleValue(), aRealDepthRight.GetDoubleValue(), nXLineDelta); + } + while(nXLineDelta--) { // Werte vorbereiten @@ -1657,9 +1764,25 @@ void Base3DDefault::DrawLineTexture(long nYPos, Color& rCol) { // Texturkoordinateninterpolation? Color aCol = rCol; - GetActiveTexture()->ModifyColor(aCol, - aIntTexSLine.GetDoubleValue(), - aIntTexTLine.GetDoubleValue()); + + // #96837# + if(mbPTCorrection) + { + GetActiveTexture()->ModifyColor( + aCol, + aIntTexSLine.GetDoubleValue() / aRealDepthLine.GetDoubleValue(), + aIntTexTLine.GetDoubleValue() / aRealDepthLine.GetDoubleValue() + ); + } + else + { + GetActiveTexture()->ModifyColor( + aCol, + aIntTexSLine.GetDoubleValue(), + aIntTexTLine.GetDoubleValue() + ); + } + WritePixel(nXLineStart, nYPos, aCol, nDepth); } @@ -1672,6 +1795,12 @@ void Base3DDefault::DrawLineTexture(long nYPos, Color& rCol) aIntDepthLine.Increment(); aIntTexSLine.Increment(); aIntTexTLine.Increment(); + + // #96837# + if(mbPTCorrection) + { + aRealDepthLine.Increment(); + } } } } @@ -1724,12 +1853,36 @@ void Base3DDefault::LoadLeftTexture(long nSize) { aIntXPosLeft.Load(aOutPointLeft.X(), aOutPointRight.X(), nSize); aIntDepthLeft.Load(pEntLeft->Point().Z(), pEntRight->Point().Z(), nSize); - aIntTexSLeft.Load( - pEntLeft->TexCoor().X() * fTexWidth, - pEntRight->TexCoor().X() * fTexWidth, nSize); - aIntTexTLeft.Load( - pEntLeft->TexCoor().Y() * fTexHeight, - pEntRight->TexCoor().Y() * fTexHeight, nSize); + + // #96837# + if(mbPTCorrection) + { + const double fRealDepthLeft = 1.0 / GetTransformationSet()->ViewToEyeCoor(pEntLeft->Point().GetVector3D()).Z(); + const double fRealDepthRight = 1.0 / GetTransformationSet()->ViewToEyeCoor(pEntRight->Point().GetVector3D()).Z(); + aRealDepthLeft.Load(fRealDepthLeft, fRealDepthRight, nSize); + + aIntTexSLeft.Load( + pEntLeft->TexCoor().X() * fTexWidth * fRealDepthLeft, + pEntRight->TexCoor().X() * fTexWidth * fRealDepthRight, + nSize); + + aIntTexTLeft.Load( + pEntLeft->TexCoor().Y() * fTexHeight * fRealDepthLeft, + pEntRight->TexCoor().Y() * fTexHeight * fRealDepthRight, + nSize); + } + else + { + aIntTexSLeft.Load( + pEntLeft->TexCoor().X() * fTexWidth, + pEntRight->TexCoor().X() * fTexWidth, + nSize); + + aIntTexTLeft.Load( + pEntLeft->TexCoor().Y() * fTexHeight, + pEntRight->TexCoor().Y() * fTexHeight, + nSize); + } } void Base3DDefault::LoadLeft(long nSize) @@ -1742,12 +1895,37 @@ void Base3DDefault::LoadRightTexture(long nSize) { aIntXPosRight.Load(aOutPointRight.X(), aOutPointLeft.X(), nSize); aIntDepthRight.Load(pEntRight->Point().Z(), pEntLeft->Point().Z(), nSize); - aIntTexSRight.Load( - pEntRight->TexCoor().X() * fTexWidth, - pEntLeft->TexCoor().X() * fTexWidth, nSize); - aIntTexTRight.Load( - pEntRight->TexCoor().Y() * fTexHeight, - pEntLeft->TexCoor().Y() * fTexHeight, nSize); + + // #96837# + if(mbPTCorrection) + { + const double fRealDepthLeft = 1.0 / GetTransformationSet()->ViewToEyeCoor(pEntLeft->Point().GetVector3D()).Z(); + const double fRealDepthRight = 1.0 / GetTransformationSet()->ViewToEyeCoor(pEntRight->Point().GetVector3D()).Z(); + aRealDepthRight.Load(fRealDepthRight, fRealDepthLeft, nSize); + + // #96837# + aIntTexSRight.Load( + pEntRight->TexCoor().X() * fTexWidth * fRealDepthRight, + pEntLeft->TexCoor().X() * fTexWidth * fRealDepthLeft, + nSize); + + aIntTexTRight.Load( + pEntRight->TexCoor().Y() * fTexHeight * fRealDepthRight, + pEntLeft->TexCoor().Y() * fTexHeight * fRealDepthLeft, + nSize); + } + else + { + aIntTexSRight.Load( + pEntRight->TexCoor().X() * fTexWidth, + pEntLeft->TexCoor().X() * fTexWidth, + nSize); + + aIntTexTRight.Load( + pEntRight->TexCoor().Y() * fTexHeight, + pEntLeft->TexCoor().Y() * fTexHeight, + nSize); + } } void Base3DDefault::LoadRight(long nSize) @@ -1760,6 +1938,13 @@ void Base3DDefault::NextStepRightTexture() { aIntXPosRight.Increment(); aIntDepthRight.Increment(); + + // #96837# + if(mbPTCorrection) + { + aRealDepthRight.Increment(); + } + aIntTexSRight.Increment(); aIntTexTRight.Increment(); } @@ -1774,6 +1959,13 @@ void Base3DDefault::NextStepLeftTexture() { aIntXPosLeft.Increment(); aIntDepthLeft.Increment(); + + // #96837# + if(mbPTCorrection) + { + aRealDepthLeft.Increment(); + } + aIntTexSLeft.Increment(); aIntTexTLeft.Increment(); } @@ -1784,3 +1976,4 @@ void Base3DDefault::NextStepLeft() aIntDepthLeft.Increment(); } +// eof diff --git a/goodies/source/base3d/b3ddeflt.hxx b/goodies/source/base3d/b3ddeflt.hxx index be022af8b0f2..178802e10f31 100644 --- a/goodies/source/base3d/b3ddeflt.hxx +++ b/goodies/source/base3d/b3ddeflt.hxx @@ -2,9 +2,9 @@ * * $RCSfile: b3ddeflt.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:30:10 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -137,9 +137,18 @@ private: // benoetigte Interpolatoren BxdInterpolator aIntXPosLeft; BxdInterpolator aIntXPosRight; + BxdInterpolator aIntDepthLeft; BxdInterpolator aIntDepthRight; BxdInterpolator aIntDepthLine; + + // #96837# + // Added interpolators for real z coordinate in eye coor. In these, + // 1/z is interpolated to have a base for perspective corrected texturing. + BxdInterpolator aRealDepthLeft; + BxdInterpolator aRealDepthRight; + BxdInterpolator aRealDepthLine; + BxdInterpolator aIntTexSLeft; BxdInterpolator aIntTexSRight; BxdInterpolator aIntTexTLeft; @@ -164,6 +173,10 @@ private: unsigned bReducedDetail : 1; unsigned bDetailBackedup : 1; + // #96837# + // Bool for enabling/disabling perspective texture correction + unsigned mbPTCorrection : 1; + // Funktionen fuer erlangen/freigeben der BitmapAccesses void AcquireAccess(); void ReleaseAccess(); diff --git a/goodies/source/filter.vcl/egif/dlgegif.src b/goodies/source/filter.vcl/egif/dlgegif.src index f408365724fb..6038456da5c4 100644 --- a/goodies/source/filter.vcl/egif/dlgegif.src +++ b/goodies/source/filter.vcl/egif/dlgegif.src @@ -2,9 +2,9 @@ * * $RCSfile: dlgegif.src,v $ * - * $Revision: 1.20 $ + * $Revision: 1.21 $ * - * last change: $Author: obo $ $Date: 2001-08-24 13:24:00 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -74,7 +74,7 @@ ModalDialog DLG_EXPORT_GIF Text [ spanish ] = "Opciones GIF" ; Text [ french ] = "Options GIF" ; Text [ dutch ] = "GIF-opties" ; - Text [ swedish ] = "GIF alternativ" ; + Text [ swedish ] = "GIF-alternativ" ; Text [ danish ] = "GIF indstillinger" ; Text [ portuguese_brazilian ] = "GIF Optionen" ; Text [ portuguese ] = "Opes GIF" ; @@ -115,7 +115,7 @@ ModalDialog DLG_EXPORT_GIF Text[ chinese_simplified ] = "模式"; Text[ russian ] = ""; Text[ polish ] = "Tryb"; - Text[ japanese ] = "モード"; + Text[ japanese ] = "モード"; Text[ chinese_traditional ] = "模式"; Text[ arabic ] = ""; Text[ dutch ] = "Modus"; @@ -124,8 +124,9 @@ ModalDialog DLG_EXPORT_GIF Text[ korean ] = "모드"; Text[ turkish ] = "Kip"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Modo"; + Text[ catalan ] = "Mode"; Text[ finnish ] = "Tila"; + Text[ thai ] = "โหมด"; }; CheckBox CBX_INTERLACED { @@ -146,7 +147,7 @@ ModalDialog DLG_EXPORT_GIF Text[ chinese_simplified ] = "交错(~I)"; Text[ russian ] = "~ "; Text[ polish ] = "Interlaced"; - Text[ japanese ] = "インターレース方式(~I)"; + Text[ japanese ] = "インターレース方式(~I)"; Text[ chinese_traditional ] = "交錯(~I)"; Text[ arabic ] = ""; Text[ dutch ] = "~Interlaced"; @@ -155,8 +156,9 @@ ModalDialog DLG_EXPORT_GIF Text[ korean ] = "인터레이스(~I)"; Text[ turkish ] = "~Interlaced"; Text[ language_user1 ] = " "; - Text[ catalan ] = "~Entrelazado"; - Text[ finnish ] = "~Lomitettu"; + Text[ catalan ] = "~Entrellaat"; + Text[ finnish ] = "Lomitettu"; + Text[ thai ] = "~ประสานกัน"; }; FixedLine GRP_DRAW { @@ -176,10 +178,10 @@ ModalDialog DLG_EXPORT_GIF Text[ chinese_simplified ] = "绘图对象"; Text[ russian ] = " "; Text[ polish ] = "Obiekty graficzne"; - Text[ japanese ] = "図形描画オブジェクト"; + Text[ japanese ] = "図形描画オブジェクト"; Text[ russian ] = " "; Text[ polish ] = "Obiekty graficzne"; - Text[ japanese ] = "図形描画オブジェクト"; + Text[ japanese ] = "図形描画オブジェクト"; Text[ chinese_simplified ] = "绘图对象"; Text[ chinese_traditional ] = "繪圖物件"; Text[ arabic ] = " "; @@ -189,8 +191,9 @@ ModalDialog DLG_EXPORT_GIF Text[ korean ] = "그리기 개체"; Text[ turkish ] = "izim nesneleri"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Objetos de dibujo"; + Text[ catalan ] = "Objectes de dibuix"; Text[ finnish ] = "Piirrosobjektit"; + Text[ thai ] = "วัตถุวาดรูป"; }; CheckBox CBX_TRANSLUCENT { @@ -220,13 +223,14 @@ ModalDialog DLG_EXPORT_GIF Text[ korean ] = "투명 모드 저장(~T)"; Text[ turkish ] = "Saydam biimde kaydet"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Guardar en modo ~transparente"; - Text[ finnish ] = "Tallenna ~lpinkyvyys"; + Text[ catalan ] = "Desa la ~transparncia"; + Text[ finnish ] = "Tallenna lpinkyvyys"; + Text[ thai ] = "บันทึกความโ~ปร่งแสง"; }; Text[ chinese_simplified ] = "GIF 选项"; Text[ russian ] = " GIF"; Text[ polish ] = "Opcje GIF"; - Text[ japanese ] = "GIF オプション"; + Text[ japanese ] = "GIF オプション"; Text[ chinese_traditional ] = "GIF選項"; Text[ arabic ] = "GIF "; Text[ dutch ] = "GIF-opties"; @@ -235,8 +239,9 @@ ModalDialog DLG_EXPORT_GIF Text[ korean ] = "GIF 옵션"; Text[ turkish ] = "GIF seenekleri"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Opciones GIF"; - Text[ finnish ] = "GIF-asetukset"; + Text[ catalan ] = "Opcions GIF"; + Text[ finnish ] = "GIF-vientiasetukset"; + Text[ thai ] = "ตัวเลือก GIF "; }; @@ -247,3 +252,10 @@ ModalDialog DLG_EXPORT_GIF + + + + + + + diff --git a/goodies/source/filter.vcl/egif/makefile.mk b/goodies/source/filter.vcl/egif/makefile.mk index a2b53823d426..e6e5cc46eaf7 100644 --- a/goodies/source/filter.vcl/egif/makefile.mk +++ b/goodies/source/filter.vcl/egif/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.4 $ +# $Revision: 1.5 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:02 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:08 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -117,7 +117,6 @@ SHL1BASE=0x1c000000 all: ALLTAR -# THB: exports list goodies checked for 6.0 Final 6.12.2001 .IF "$(GUI)" == "OS2" $(MISC)$/$(SHL1TARGET).def:\ diff --git a/goodies/source/filter.vcl/eos2met/dlgeos2.src b/goodies/source/filter.vcl/eos2met/dlgeos2.src index b19153b576db..5973e468c1f7 100644 --- a/goodies/source/filter.vcl/eos2met/dlgeos2.src +++ b/goodies/source/filter.vcl/eos2met/dlgeos2.src @@ -2,9 +2,9 @@ * * $RCSfile: dlgeos2.src,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: kz $ $Date: 2001-08-08 09:07:06 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,7 +76,7 @@ ModalDialog DLG_EXPORT_EMET Text [ spanish ] = "Opciones MET" ; Text [ french ] = "Options MET" ; Text [ dutch ] = "MET-opties" ; - Text [ swedish ] = "MET alternativ" ; + Text [ swedish ] = "MET-alternativ" ; Text [ danish ] = "MET indstillinger" ; Text [ portuguese_brazilian ] = "MET Optionen" ; Text [ portuguese ] = "Opes MET" ; @@ -131,7 +131,7 @@ ModalDialog DLG_EXPORT_EMET Text [ portuguese_brazilian ] = "Tamanho" ; Text[ russian ] = ""; Text[ polish ] = "Rozmiar"; - Text[ japanese ] = "サイズ"; + Text[ japanese ] = "サイズ"; Text[ chinese_simplified ] = "大小"; Text[ chinese_traditional ] = "大小"; Text[ arabic ] = ""; @@ -141,8 +141,9 @@ ModalDialog DLG_EXPORT_EMET Text[ korean ] = "크기"; Text[ turkish ] = "Boyut"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Tamao"; + Text[ catalan ] = "Mida"; Text[ finnish ] = "Koko"; + Text[ thai ] = "ขนาด"; }; FixedText FT_SIZEX { @@ -171,8 +172,9 @@ ModalDialog DLG_EXPORT_EMET Text[ korean ] = "너비"; Text[ turkish ] = "Genilik"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Ancho"; + Text[ catalan ] = "Amplada"; Text[ finnish ] = "Leveys"; + Text[ thai ] = "ความกว้าง"; }; FixedText FT_SIZEY { @@ -201,8 +203,9 @@ ModalDialog DLG_EXPORT_EMET Text[ korean ] = "높이"; Text[ turkish ] = "Ykseklik"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Altura"; + Text[ catalan ] = "Alada"; Text[ finnish ] = "Korkeus"; + Text[ thai ] = "ความสูง"; }; OKButton BTN_OK { @@ -234,25 +237,26 @@ ModalDialog DLG_EXPORT_EMET Text [ english_us ] = "~Original" ; Text [ italian ] = "~Originale" ; Text [ spanish ] = "~Original" ; - Text [ french ] = "~Original" ; + Text [ french ] = "Original" ; Text [ swedish ] = "~Original" ; Text [ danish ] = "~Original" ; Text [ portuguese_brazilian ] = "~Original" ; Text [ portuguese ] = "~Original" ; Text[ russian ] = ""; Text[ polish ] = "Orygina"; - Text[ japanese ] = "オリジナル(~O)"; + Text[ japanese ] = "オリジナル(~O)"; Text[ chinese_simplified ] = "原件(~O)"; Text[ chinese_traditional ] = "原件(~O)"; Text[ arabic ] = ""; Text[ dutch ] = "~Origineel"; Text[ chinese_simplified ] = "原件(~O)"; Text[ greek ] = "~"; - Text[ korean ] = "오리지널(~O)"; + Text[ korean ] = "원본(~O)"; Text[ language_user1 ] = " "; Text[ turkish ] = "Asl"; Text[ catalan ] = "~Original"; Text[ finnish ] = "~Alkuperinen"; + Text[ thai ] = "~ดั้งเดิม"; }; RadioButton RB_SIZE { @@ -272,7 +276,7 @@ ModalDialog DLG_EXPORT_EMET Text [ portuguese_brazilian ] = "~Tamanho" ; Text[ russian ] = ""; Text[ polish ] = "Rozmiar"; - Text[ japanese ] = "サイズ(~S)"; + Text[ japanese ] = "サイズ(~S)"; Text[ chinese_simplified ] = "大小(~S)"; Text[ chinese_traditional ] = "大小(~S)"; Text[ arabic ] = ""; @@ -282,8 +286,9 @@ ModalDialog DLG_EXPORT_EMET Text[ korean ] = "크기(~S)"; Text[ turkish ] = "Boyut"; Text[ language_user1 ] = " "; - Text[ catalan ] = "~Tamao"; + Text[ catalan ] = "~Mida"; Text[ finnish ] = "~Koko"; + Text[ thai ] = "~ขนาด"; }; FixedLine GRP_MODE { @@ -302,7 +307,7 @@ ModalDialog DLG_EXPORT_EMET Text [ portuguese ] = "Modo" ; Text[ russian ] = ""; Text[ polish ] = "Tryb"; - Text[ japanese ] = "モード"; + Text[ japanese ] = "モード"; Text[ chinese_simplified ] = "模式"; Text[ chinese_traditional ] = "模式"; Text[ arabic ] = ""; @@ -312,12 +317,13 @@ ModalDialog DLG_EXPORT_EMET Text[ korean ] = "모드"; Text[ turkish ] = "Kip"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Modo"; + Text[ catalan ] = "Mode"; Text[ finnish ] = "Tila"; + Text[ thai ] = "โหมด"; }; Text[ russian ] = " MET"; Text[ polish ] = "Opcje MET"; - Text[ japanese ] = "MET オプション"; + Text[ japanese ] = "MET オプション"; Text[ chinese_simplified ] = "MET 选项"; Text[ chinese_traditional ] = "MET 選項"; Text[ arabic ] = "MET "; @@ -327,9 +333,23 @@ ModalDialog DLG_EXPORT_EMET Text[ korean ] = "MET 옵션"; Text[ turkish ] = "MET seenekleri"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Opciones MET"; - Text[ finnish ] = "MET-asetukset"; + Text[ catalan ] = "Opcions MET"; + Text[ finnish ] = "MET-vientiasetukset"; + Text[ thai ] = "ตัวเลือก MET "; }; + + + + + + + + + + + + + diff --git a/goodies/source/filter.vcl/eos2met/makefile.mk b/goodies/source/filter.vcl/eos2met/makefile.mk index 27d5efe99c96..361cdba344d4 100644 --- a/goodies/source/filter.vcl/eos2met/makefile.mk +++ b/goodies/source/filter.vcl/eos2met/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.4 $ +# $Revision: 1.5 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:02 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:09 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -112,7 +112,6 @@ SHL1BASE=0x1c000000 all: ALLTAR -# THB: exports list goodies checked for 6.0 Final 6.12.2001 .IF "$(GUI)" == "OS2" $(MISC)$/$(SHL1TARGET).def:\ diff --git a/goodies/source/filter.vcl/epbm/dlgepbm.src b/goodies/source/filter.vcl/epbm/dlgepbm.src index 754c9ea0171a..14b786caade3 100644 --- a/goodies/source/filter.vcl/epbm/dlgepbm.src +++ b/goodies/source/filter.vcl/epbm/dlgepbm.src @@ -2,9 +2,9 @@ * * $RCSfile: dlgepbm.src,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: kz $ $Date: 2001-07-13 20:14:49 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -101,23 +101,24 @@ ModalDialog DLG_EXPORT_EPBM Text[ danish ] = "Filformat"; Text[ french ] = "Format de fichier"; Text[ swedish ] = "Filformat"; - Text[ dutch ] = "Bestandsformaat"; + Text[ dutch ] = "Bestandsindeling"; Text[ spanish ] = "Formato de archivo"; Text[ english_us ] = "File format"; - Text[ chinese_simplified ] = "ļʽ"; + Text[ chinese_simplified ] = "文件格式"; Text[ russian ] = " "; Text[ polish ] = "Format pliku"; - Text[ japanese ] = "̧ق̏"; - Text[ chinese_traditional ] = "ɮ榡"; + Text[ japanese ] = "ファイルの書式"; + Text[ chinese_traditional ] = "檔案格式"; Text[ arabic ] = " "; - Text[ dutch ] = "Bestandsformaat"; - Text[ chinese_simplified ] = "ļʽ"; + Text[ dutch ] = "Bestandsindeling"; + Text[ chinese_simplified ] = "文件格式"; Text[ greek ] = " "; - Text[ korean ] = " "; + Text[ korean ] = "파일 형식"; Text[ turkish ] = "Dosya format"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Formato de archivo"; + Text[ catalan ] = "Format del fitxer"; Text[ finnish ] = "Tiedostomuoto"; + Text[ thai ] = "รูปแบบแฟ้ม"; }; RadioButton RB_RAW { @@ -135,20 +136,21 @@ ModalDialog DLG_EXPORT_EPBM Text[ dutch ] = "~Binair"; Text[ spanish ] = "~Binario"; Text[ english_us ] = "~Binary"; - Text[ chinese_simplified ] = "Ԫ(~B)"; + Text[ chinese_simplified ] = "二元(~B)"; Text[ russian ] = ""; Text[ polish ] = "Binarny"; - Text[ japanese ] = "(~B)"; + Text[ japanese ] = "バイナリ(~B)"; Text[ language_user1 ] = " "; - Text[ chinese_traditional ] = "G(~B)"; + Text[ chinese_traditional ] = "二元(~B)"; Text[ arabic ] = ""; Text[ dutch ] = "~Binair"; - Text[ chinese_simplified ] = "Ԫ(~B)"; + Text[ chinese_simplified ] = "二元(~B)"; Text[ greek ] = ""; - Text[ korean ] = "̳ʸ(~B)"; + Text[ korean ] = "바이너리(~B)"; Text[ turkish ] = "kili"; - Text[ catalan ] = "~Binario"; - Text[ finnish ] = "~Binri"; + Text[ catalan ] = "~Binari"; + Text[ finnish ] = "~Binaari"; + Text[ thai ] = "เ~ลขฐานสอง"; }; RadioButton RB_ASCII { @@ -161,50 +163,62 @@ ModalDialog DLG_EXPORT_EPBM Text[ portuguese_brazilian ] = "~Text"; Text[ portuguese ] = "~Texto"; Text[ danish ] = "~Tekst"; - Text[ french ] = "~Texte"; + Text[ french ] = "Texte"; Text[ swedish ] = "~Text"; Text[ dutch ] = "~Tekst"; Text[ spanish ] = "~Texto"; Text[ english_us ] = "~Text"; - Text[ chinese_simplified ] = "(~T)"; + Text[ chinese_simplified ] = "文字(~T)"; Text[ russian ] = ""; Text[ polish ] = "Tekst"; - Text[ japanese ] = "÷(~T)"; - Text[ chinese_traditional ] = "r(~T)"; + Text[ japanese ] = "テキスト(~T)"; + Text[ chinese_traditional ] = "文字(~T)"; Text[ arabic ] = ""; Text[ dutch ] = "~Tekst"; - Text[ chinese_simplified ] = "(~T)"; + Text[ chinese_simplified ] = "文字(~T)"; Text[ greek ] = ""; - Text[ korean ] = "ؽƮ(~T)"; + Text[ korean ] = "텍스트(~T)"; Text[ turkish ] = "Metin"; Text[ language_user1 ] = " "; - Text[ catalan ] = "~Texto"; + Text[ catalan ] = "~Text"; Text[ finnish ] = "~Teksti"; + Text[ thai ] = "~ข้อความ"; }; Text[ italian ] = "Opzioni PBM"; Text[ portuguese_brazilian ] = "PBM Optionen"; Text[ portuguese ] = "Opes PBM"; Text[ danish ] = "PBM indstillinger"; Text[ french ] = "Options PBM"; - Text[ swedish ] = "PBM alternativ"; + Text[ swedish ] = "PBM-alternativ"; Text[ dutch ] = "PBM-opties"; Text[ spanish ] = "Opciones PBM "; - Text[ chinese_simplified ] = "PBM ѡ"; + Text[ chinese_simplified ] = "PBM 选项"; Text[ russian ] = " PBM"; Text[ polish ] = "Opcje PBM "; - Text[ japanese ] = "PBM "; - Text[ chinese_traditional ] = "PBMﶵ"; + Text[ japanese ] = "PBM オプション"; + Text[ chinese_traditional ] = "PBM選項"; Text[ arabic ] = "PBM "; Text[ dutch ] = "PBM-opties"; - Text[ chinese_simplified ] = "PBM ѡ"; + Text[ chinese_simplified ] = "PBM 选项"; Text[ greek ] = " PBM"; - Text[ korean ] = "PBM ɼ"; + Text[ korean ] = "PBM 옵션"; Text[ turkish ] = "PBM seenekleri"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Opciones PBM "; - Text[ finnish ] = "PBM-asetukset"; + Text[ catalan ] = "Opcions PBM"; + Text[ finnish ] = "PBM-vientiasetukset"; + Text[ thai ] = "ตัวเลือก PBM "; }; + + + + + + + + + + diff --git a/goodies/source/filter.vcl/epbm/makefile.mk b/goodies/source/filter.vcl/epbm/makefile.mk index b1188a61a65f..2a2a44904029 100644 --- a/goodies/source/filter.vcl/epbm/makefile.mk +++ b/goodies/source/filter.vcl/epbm/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.4 $ +# $Revision: 1.5 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:02 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:10 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -114,7 +114,6 @@ SHL1BASE=0x1c000000 all: ALLTAR -# THB: exports list goodies checked for 6.0 Final 6.12.2001 .IF "$(GUI)" == "OS2" $(MISC)$/$(SHL1TARGET).def:\ diff --git a/goodies/source/filter.vcl/epgm/dlgepgm.src b/goodies/source/filter.vcl/epgm/dlgepgm.src index cc7a9084a0e3..fecae25dd289 100644 --- a/goodies/source/filter.vcl/epgm/dlgepgm.src +++ b/goodies/source/filter.vcl/epgm/dlgepgm.src @@ -2,9 +2,9 @@ * * $RCSfile: dlgepgm.src,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: vg $ $Date: 2001-11-16 22:12:03 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -101,23 +101,24 @@ ModalDialog DLG_EXPORT_EPGM Text[ danish ] = "Filformat"; Text[ french ] = "Format de fichier"; Text[ swedish ] = "Filformat"; - Text[ dutch ] = "Bestandsformaat"; + Text[ dutch ] = "Bestandsindeling"; Text[ spanish ] = "Formato de archivo"; Text[ english_us ] = "File format"; Text[ chinese_simplified ] = "文件格式"; Text[ russian ] = " "; Text[ polish ] = "Format pliku"; - Text[ japanese ] = "ファイルの書式"; + Text[ japanese ] = "ファイルの書式"; Text[ chinese_traditional ] = "檔案格式"; Text[ arabic ] = " "; - Text[ dutch ] = "Bestandsformaat"; + Text[ dutch ] = "Bestandsindeling"; Text[ chinese_simplified ] = "文件格式"; Text[ greek ] = " "; Text[ korean ] = "파일 서식"; Text[ turkish ] = "Dosya format"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Formato de archivo"; + Text[ catalan ] = "Format del fitxer"; Text[ finnish ] = "Tiedostomuoto"; + Text[ thai ] = "รูปแบบแฟ้ม"; }; RadioButton RB_RAW { @@ -138,7 +139,7 @@ ModalDialog DLG_EXPORT_EPGM Text[ chinese_simplified ] = "二元(~B)"; Text[ russian ] = ""; Text[ polish ] = "Binarny"; - Text[ japanese ] = "バイナリ(~B)"; + Text[ japanese ] = "バイナリ(~B)"; Text[ language_user1 ] = " "; Text[ chinese_traditional ] = "二元(~B)"; Text[ arabic ] = ""; @@ -147,8 +148,9 @@ ModalDialog DLG_EXPORT_EPGM Text[ greek ] = ""; Text[ korean ] = "바이너리(~B)"; Text[ turkish ] = "kili"; - Text[ catalan ] = "~Binario"; - Text[ finnish ] = "~Binri"; + Text[ catalan ] = "~Binari"; + Text[ finnish ] = "~Binaari"; + Text[ thai ] = "เ~ลขฐานสอง"; }; RadioButton RB_ASCII { @@ -161,7 +163,7 @@ ModalDialog DLG_EXPORT_EPGM Text[ portuguese_brazilian ] = "~Text"; Text[ portuguese ] = "~Texto"; Text[ danish ] = "~Tekst"; - Text[ french ] = "~Texte"; + Text[ french ] = "Texte"; Text[ swedish ] = "~Text"; Text[ dutch ] = "~Tekst"; Text[ spanish ] = "~Texto"; @@ -169,7 +171,7 @@ ModalDialog DLG_EXPORT_EPGM Text[ chinese_simplified ] = "文字(~T)"; Text[ russian ] = ""; Text[ polish ] = "Tekst"; - Text[ japanese ] = "テキスト(~T)"; + Text[ japanese ] = "テキスト(~T)"; Text[ chinese_traditional ] = "文字(~T)"; Text[ arabic ] = ""; Text[ dutch ] = "~Tekst"; @@ -178,21 +180,22 @@ ModalDialog DLG_EXPORT_EPGM Text[ korean ] = "텍스트(~T)"; Text[ turkish ] = "Metin"; Text[ language_user1 ] = " "; - Text[ catalan ] = "~Texto"; + Text[ catalan ] = "~Text"; Text[ finnish ] = "~Teksti"; + Text[ thai ] = "~ข้อความ"; }; Text[ italian ] = "Opzioni PGM"; Text[ portuguese_brazilian ] = "PGM Optionen"; Text[ portuguese ] = "Opes PGM"; Text[ danish ] = "PGM indstillinger"; Text[ french ] = "Options PGM"; - Text[ swedish ] = "PGM alternativ"; + Text[ swedish ] = "PGM-alternativ"; Text[ dutch ] = "PGM-opties"; Text[ spanish ] = "Opciones PGM"; Text[ chinese_simplified ] = "PGM 选项"; Text[ russian ] = " PGM"; Text[ polish ] = "Opcje PGM"; - Text[ japanese ] = "PGM オプション"; + Text[ japanese ] = "PGM オプション"; Text[ chinese_traditional ] = "PGM選項"; Text[ arabic ] = "PGM "; Text[ dutch ] = "PGM-opties"; @@ -201,8 +204,9 @@ ModalDialog DLG_EXPORT_EPGM Text[ korean ] = "PGM 옵션"; Text[ turkish ] = "PGM seenekleri"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Opciones PGM"; - Text[ finnish ] = "PGM-asetukset"; + Text[ catalan ] = "Opcions PGM"; + Text[ finnish ] = "PGM-vientiasetukset"; + Text[ thai ] = "ตัวเลือก PGM "; }; @@ -212,3 +216,8 @@ ModalDialog DLG_EXPORT_EPGM + + + + + diff --git a/goodies/source/filter.vcl/epgm/makefile.mk b/goodies/source/filter.vcl/epgm/makefile.mk index d147757fe106..52b43130f594 100644 --- a/goodies/source/filter.vcl/epgm/makefile.mk +++ b/goodies/source/filter.vcl/epgm/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.4 $ +# $Revision: 1.5 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:02 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:10 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -114,7 +114,7 @@ SHL1BASE=0x1c000000 all: ALLTAR -# THB: exports list goodies checked for 6.0 Final 6.12.2001 + .IF "$(GUI)" == "OS2" $(MISC)$/$(SHL1TARGET).def:\ diff --git a/goodies/source/filter.vcl/epict/dlgepct.src b/goodies/source/filter.vcl/epict/dlgepct.src index 72770062203f..5d8ad90bb63f 100644 --- a/goodies/source/filter.vcl/epict/dlgepct.src +++ b/goodies/source/filter.vcl/epict/dlgepct.src @@ -2,9 +2,9 @@ * * $RCSfile: dlgepct.src,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: kz $ $Date: 2001-08-21 20:15:45 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -73,7 +73,7 @@ ModalDialog DLG_EXPORT_EPCT Text [ spanish ] = "Opciones PICT" ; Text [ french ] = "Options PICT" ; Text [ dutch ] = "PICT-opties" ; - Text [ swedish ] = "PICT alternativ" ; + Text [ swedish ] = "PICT-alternativ" ; Text [ danish ] = "PICT indstillinger" ; Text [ portuguese_brazilian ] = "PICT Optionen" ; Text [ portuguese ] = "Opes PICT" ; @@ -131,7 +131,7 @@ ModalDialog DLG_EXPORT_EPCT Text[ chinese_simplified ] = "大小"; Text[ russian ] = ""; Text[ polish ] = "Rozmiar"; - Text[ japanese ] = "サイズ"; + Text[ japanese ] = "サイズ"; Text[ chinese_traditional ] = "大小"; Text[ arabic ] = ""; Text[ dutch ] = "Grootte"; @@ -140,8 +140,9 @@ ModalDialog DLG_EXPORT_EPCT Text[ korean ] = "크기"; Text[ turkish ] = "Boyut"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Tamao"; + Text[ catalan ] = "Mida"; Text[ finnish ] = "Koko"; + Text[ thai ] = "ขนาด"; }; FixedText FT_SIZEX { @@ -170,8 +171,9 @@ ModalDialog DLG_EXPORT_EPCT Text[ korean ] = "너비"; Text[ turkish ] = "Genilik"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Ancho"; + Text[ catalan ] = "Amplada"; Text[ finnish ] = "Leveys"; + Text[ thai ] = "ความกว้าง"; }; FixedText FT_SIZEY { @@ -200,8 +202,9 @@ ModalDialog DLG_EXPORT_EPCT Text[ korean ] = "높이"; Text[ turkish ] = "Ykseklik"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Altura"; + Text[ catalan ] = "Alada"; Text[ finnish ] = "Korkeus"; + Text[ thai ] = "ความสูง"; }; OKButton BTN_OK { @@ -233,7 +236,7 @@ ModalDialog DLG_EXPORT_EPCT Text [ english_us ] = "~Original" ; Text [ italian ] = "~Originale" ; Text [ spanish ] = "~Original" ; - Text [ french ] = "~Original" ; + Text [ french ] = "Original" ; Text [ swedish ] = "~Original" ; Text [ danish ] = "~Original" ; Text [ portuguese_brazilian ] = "~Original" ; @@ -241,17 +244,18 @@ ModalDialog DLG_EXPORT_EPCT Text[ chinese_simplified ] = "原件(~O)"; Text[ russian ] = ""; Text[ polish ] = "Orygina"; - Text[ japanese ] = "オリジナル(~O)"; + Text[ japanese ] = "オリジナル(~O)"; Text[ chinese_traditional ] = "原件(~O)"; Text[ arabic ] = ""; Text[ dutch ] = "~Origineel"; Text[ chinese_simplified ] = "原件(~O)"; Text[ greek ] = ""; - Text[ korean ] = "오리지널(~O)"; + Text[ korean ] = "원본(~O)"; Text[ turkish ] = "Asl"; Text[ language_user1 ] = " "; Text[ catalan ] = "~Original"; Text[ finnish ] = "~Alkuperinen"; + Text[ thai ] = "~ดั้งเดิม"; }; RadioButton RB_SIZE { @@ -272,7 +276,7 @@ ModalDialog DLG_EXPORT_EPCT Text[ chinese_simplified ] = "大小(~S)"; Text[ russian ] = ""; Text[ polish ] = "Rozmiar"; - Text[ japanese ] = "サイズ(~S)"; + Text[ japanese ] = "サイズ(~S)"; Text[ chinese_traditional ] = "大小(~S)"; Text[ arabic ] = ""; Text[ dutch ] = "~Grootte"; @@ -281,8 +285,9 @@ ModalDialog DLG_EXPORT_EPCT Text[ korean ] = "크기(~S)"; Text[ turkish ] = "Boyut"; Text[ language_user1 ] = " "; - Text[ catalan ] = "~Tamao"; + Text[ catalan ] = "~Mida"; Text[ finnish ] = "~Koko"; + Text[ thai ] = "~ขนาด"; }; FixedLine GRP_MODE { @@ -302,7 +307,7 @@ ModalDialog DLG_EXPORT_EPCT Text[ chinese_simplified ] = "模式"; Text[ russian ] = ""; Text[ polish ] = "Tryb"; - Text[ japanese ] = "モード"; + Text[ japanese ] = "モード"; Text[ chinese_traditional ] = "模式"; Text[ arabic ] = ""; Text[ dutch ] = "Modus"; @@ -311,13 +316,14 @@ ModalDialog DLG_EXPORT_EPCT Text[ korean ] = "모드"; Text[ turkish ] = "Kip"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Modo"; + Text[ catalan ] = "Mode"; Text[ finnish ] = "Tila"; + Text[ thai ] = "โหมด"; }; Text[ chinese_simplified ] = "PICT 选项"; Text[ russian ] = " PICT"; Text[ polish ] = "Opcje PICT"; - Text[ japanese ] = "PICT オプション"; + Text[ japanese ] = "PICT オプション"; Text[ chinese_traditional ] = "PICT選項"; Text[ arabic ] = "PICT "; Text[ dutch ] = "PICT-opties"; @@ -326,8 +332,9 @@ ModalDialog DLG_EXPORT_EPCT Text[ korean ] = "PICT 옵션"; Text[ turkish ] = "PICT seenekleri"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Opciones PICT"; - Text[ finnish ] = "PICT-asetukset"; + Text[ catalan ] = "Opcions PICT"; + Text[ finnish ] = "PICT-vientiasetukset"; + Text[ thai ] = "ตัวเลือก PICT "; }; @@ -336,3 +343,14 @@ ModalDialog DLG_EXPORT_EPCT + + + + + + + + + + + diff --git a/goodies/source/filter.vcl/epict/makefile.mk b/goodies/source/filter.vcl/epict/makefile.mk index f0526dd12c0f..71d361e32ddf 100644 --- a/goodies/source/filter.vcl/epict/makefile.mk +++ b/goodies/source/filter.vcl/epict/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.4 $ +# $Revision: 1.5 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:02 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:11 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -118,7 +118,6 @@ SHL1BASE=0x1c000000 all: ALLTAR -# THB: exports list goodies checked for 6.0 Final 6.12.2001 .IF "$(GUI)" == "OS2" $(MISC)$/$(SHL1TARGET).def:\ diff --git a/goodies/source/filter.vcl/eppm/dlgeppm.src b/goodies/source/filter.vcl/eppm/dlgeppm.src index 5f4071987cfe..9a90ed100575 100644 --- a/goodies/source/filter.vcl/eppm/dlgeppm.src +++ b/goodies/source/filter.vcl/eppm/dlgeppm.src @@ -2,9 +2,9 @@ * * $RCSfile: dlgeppm.src,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: kz $ $Date: 2001-07-13 20:14:48 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -101,23 +101,24 @@ ModalDialog DLG_EXPORT_EPPM Text[ danish ] = "Filformat"; Text[ french ] = "Format de fichier"; Text[ swedish ] = "Filformat"; - Text[ dutch ] = "Bestandsformaat"; + Text[ dutch ] = "Bestandsindeling"; Text[ spanish ] = "Formato de archivo"; Text[ english_us ] = "File format"; - Text[ chinese_simplified ] = "ļʽ"; + Text[ chinese_simplified ] = "文件格式"; Text[ russian ] = " "; Text[ polish ] = "Format pliku"; - Text[ japanese ] = "̧ق̏"; - Text[ chinese_traditional ] = "ɮ榡"; + Text[ japanese ] = "ファイルの書式"; + Text[ chinese_traditional ] = "檔案格式"; Text[ arabic ] = " "; - Text[ dutch ] = "Bestandsformaat"; - Text[ chinese_simplified ] = "ļʽ"; + Text[ dutch ] = "Bestandsindeling"; + Text[ chinese_simplified ] = "文件格式"; Text[ greek ] = " "; - Text[ korean ] = " "; + Text[ korean ] = "파일 서식"; Text[ turkish ] = "Dosya format"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Formato de archivo"; + Text[ catalan ] = "Format del fitxer"; Text[ finnish ] = "Tiedostomuoto"; + Text[ thai ] = "รูปแบบแฟ้ม"; }; RadioButton RB_RAW { @@ -135,20 +136,21 @@ ModalDialog DLG_EXPORT_EPPM Text[ dutch ] = "~Binair"; Text[ spanish ] = "~Binario"; Text[ english_us ] = "~Binary"; - Text[ chinese_simplified ] = "Ԫ(~B)"; + Text[ chinese_simplified ] = "二元(~B)"; Text[ russian ] = ""; Text[ polish ] = "Binarny"; - Text[ japanese ] = "(~B)"; + Text[ japanese ] = "バイナリ(~B)"; Text[ language_user1 ] = " "; - Text[ chinese_traditional ] = "G(~B)"; + Text[ chinese_traditional ] = "二元(~B)"; Text[ arabic ] = ""; Text[ dutch ] = "~Binair"; - Text[ chinese_simplified ] = "Ԫ(~B)"; + Text[ chinese_simplified ] = "二元(~B)"; Text[ greek ] = ""; - Text[ korean ] = "̳ʸ(~B)"; + Text[ korean ] = "바이너리(~B)"; Text[ turkish ] = "kili"; - Text[ catalan ] = "~Binario"; - Text[ finnish ] = "~Binri"; + Text[ catalan ] = "~Binari"; + Text[ finnish ] = "~Binaari"; + Text[ thai ] = "เ~ลขฐานสอง"; }; RadioButton RB_ASCII { @@ -161,50 +163,62 @@ ModalDialog DLG_EXPORT_EPPM Text[ portuguese_brazilian ] = "~Text"; Text[ portuguese ] = "~Texto"; Text[ danish ] = "~Tekst"; - Text[ french ] = "~Texte"; + Text[ french ] = "Texte"; Text[ swedish ] = "~Text"; Text[ dutch ] = "~Tekst"; Text[ spanish ] = "~Texto"; Text[ english_us ] = "~Text"; - Text[ chinese_simplified ] = "(~T)"; + Text[ chinese_simplified ] = "文字(~T)"; Text[ russian ] = ""; Text[ polish ] = "Tekst"; - Text[ japanese ] = "÷(~T)"; - Text[ chinese_traditional ] = "r(~T)"; + Text[ japanese ] = "テキスト(~T)"; + Text[ chinese_traditional ] = "文字(~T)"; Text[ arabic ] = ""; Text[ dutch ] = "~Tekst"; - Text[ chinese_simplified ] = "(~T)"; + Text[ chinese_simplified ] = "文字(~T)"; Text[ greek ] = ""; - Text[ korean ] = "ؽƮ(~T)"; + Text[ korean ] = "텍스트(~T)"; Text[ turkish ] = "Metin"; Text[ language_user1 ] = " "; - Text[ catalan ] = "~Texto"; + Text[ catalan ] = "~Text"; Text[ finnish ] = "~Teksti"; + Text[ thai ] = "~ข้อความ"; }; Text[ italian ] = "Opzioni PPM"; Text[ portuguese_brazilian ] = "PPM Optionen"; Text[ portuguese ] = "Opes PPM"; Text[ danish ] = "PPM indstillinger"; Text[ french ] = "Options PPM"; - Text[ swedish ] = "PPM alternativ"; + Text[ swedish ] = "PPM-alternativ"; Text[ dutch ] = "PPM-opties"; Text[ spanish ] = "Opciones PPM "; - Text[ chinese_simplified ] = "PPM ѡ"; + Text[ chinese_simplified ] = "PPM 选项"; Text[ russian ] = " PPM"; Text[ polish ] = "Opcje PPM"; - Text[ japanese ] = "PPM "; - Text[ chinese_traditional ] = "PPMﶵ"; + Text[ japanese ] = "PPM オプション"; + Text[ chinese_traditional ] = "PPM選項"; Text[ arabic ] = "PPM "; Text[ dutch ] = "PPM-opties"; - Text[ chinese_simplified ] = "PPM ѡ"; + Text[ chinese_simplified ] = "PPM 选项"; Text[ greek ] = " PPM"; - Text[ korean ] = "PPM ɼ"; + Text[ korean ] = "PPM 옵션"; Text[ turkish ] = "PPM seenekleri"; Text[ language_user1 ] = " "; - Text[ catalan ] = "Opciones PPM "; - Text[ finnish ] = "PPM-asetukset"; + Text[ catalan ] = "Opcions PPM"; + Text[ finnish ] = "PPM-vientiasetukset"; + Text[ thai ] = "ตัวเลือก PPM "; }; + + + + + + + + + + diff --git a/goodies/source/filter.vcl/eppm/makefile.mk b/goodies/source/filter.vcl/eppm/makefile.mk index a6e8e31fe74e..493bead565bb 100644 --- a/goodies/source/filter.vcl/eppm/makefile.mk +++ b/goodies/source/filter.vcl/eppm/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.4 $ +# $Revision: 1.5 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:03 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:12 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -115,7 +115,6 @@ all: ALLTAR .IF "$(GUI)" == "OS2" -# THB: exports list goodies checked for 6.0 Final 6.12.2001 $(MISC)$/$(SHL1TARGET).def:\ makefile.mk \ $(MISC)$/$(SHL1TARGET).flt diff --git a/goodies/source/filter.vcl/eps/dlgeps.cxx b/goodies/source/filter.vcl/eps/dlgeps.cxx index 2cd3b1b1c96e..c8beae745ca9 100644 --- a/goodies/source/filter.vcl/eps/dlgeps.cxx +++ b/goodies/source/filter.vcl/eps/dlgeps.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dlgeps.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: sj $ $Date: 2002-08-15 09:23:02 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -110,6 +110,12 @@ DlgExportEPS::DlgExportEPS( FltCallDialogParameter& rPara ) : sal_Int32 nColor = pConfigItem->ReadInt32( sColorFormat, 0 ); sal_Int32 nCompr = pConfigItem->ReadInt32( sCompressionMode, 2 ); + /* SJ: The following line is not superfluous, reading the item will also #106652# + create the corresponding FilterData Property. Since all filter + are no longer accessing the configuration itself, we have fill the + FilterData sequence with all available configuration items */ + pConfigItem->ReadInt32( sTextMode, 0 ); + BOOL bCheck = FALSE; if ( nPreview & 1 ) bCheck = TRUE; diff --git a/goodies/source/filter.vcl/eps/dlgeps.src b/goodies/source/filter.vcl/eps/dlgeps.src index 493e2b183f7b..3f1eb13b52c6 100644 --- a/goodies/source/filter.vcl/eps/dlgeps.src +++ b/goodies/source/filter.vcl/eps/dlgeps.src @@ -2,9 +2,9 @@ * * $RCSfile: dlgeps.src,v $ * - * $Revision: 1.37 $ + * $Revision: 1.38 $ * - * last change: $Author: kz $ $Date: 2002-12-05 10:21:24 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -248,7 +248,7 @@ ModalDialog DLG_EXPORT_EPS Text[ dutch ] = "Niveau ~1"; Text[ chinese_simplified ] = "级别 ~1"; Text[ greek ] = " ~1"; - Text[ korean ] = "레벨 1(1)"; + Text[ korean ] = "수준1(~1)"; Text[ turkish ] = "Dzey ~1"; Text[ finnish ] = "Taso ~1"; Text[ catalan ] = "Nivell ~1"; @@ -279,7 +279,7 @@ ModalDialog DLG_EXPORT_EPS Text[ dutch ] = "Niveau ~2"; Text[ chinese_simplified ] = "级别 ~2"; Text[ greek ] = " ~2"; - Text[ korean ] = "레벨 2(2)"; + Text[ korean ] = "수준2(~2)"; Text[ turkish ] = "Dzey ~2"; Text[ finnish ] = "Taso ~2"; Text[ catalan ] = "Nivell ~2"; @@ -310,7 +310,7 @@ ModalDialog DLG_EXPORT_EPS Text[ dutch ] = "Kleuropmaak"; Text[ chinese_simplified ] = "颜色格式"; Text[ greek ] = " "; - Text[ korean ] = "색 형식"; + Text[ korean ] = "색상 서식"; Text[ turkish ] = "Renk format"; Text[ catalan ] = "Format del color"; Text[ finnish ] = "Vrimuoto"; @@ -341,7 +341,7 @@ ModalDialog DLG_EXPORT_EPS Text[ dutch ] = "~Kleur"; Text[ chinese_simplified ] = "颜色(~C)"; Text[ greek ] = ""; - Text[ korean ] = "색(~C)"; + Text[ korean ] = "색상(~C)"; Text[ turkish ] = "Renk"; Text[ finnish ] = "~Vri"; Text[ catalan ] = "~Color"; @@ -372,7 +372,7 @@ ModalDialog DLG_EXPORT_EPS Text[ dutch ] = "~Grijswaarden"; Text[ chinese_simplified ] = "灰度(~G)"; Text[ greek ] = " "; - Text[ korean ] = "회색도(~G)"; + Text[ korean ] = "회색조(~G)"; Text[ turkish ] = "Gri tonlar"; Text[ finnish ] = "~Harmaasvy"; Text[ catalan ] = "~Escala de grisos"; @@ -495,3 +495,8 @@ ModalDialog DLG_EXPORT_EPS Text[ catalan ] = "Opcions d'exportaci EPS"; Text[ thai ] = "ตัวเลือกส่ง EPS ออก"; }; + + + + + diff --git a/goodies/source/filter.vcl/eps/eps.cxx b/goodies/source/filter.vcl/eps/eps.cxx index 95f96394b676..df902c9873bb 100644 --- a/goodies/source/filter.vcl/eps/eps.cxx +++ b/goodies/source/filter.vcl/eps/eps.cxx @@ -2,9 +2,9 @@ * * $RCSfile: eps.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: sj $ $Date: 2002-11-13 16:43:04 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -89,8 +89,6 @@ #define EPS_PREVIEW_TIFF 1 #define EPS_PREVIEW_EPSI 2 -#define EPS_SCALING_FAKTOR 0.1 - #define PS_LINESIZE 70 // maximum number of characters a line in the output #define PS_NONE 0 // formating mode: action which is inserted behind the output @@ -121,15 +119,7 @@ struct StackMember Color aTextFillCol; Color aBackgroundCol; Font aFont; - MapMode aMapMode; - double fXScale; - double fYScale; - double fXOrig; - double fYOrig; - BOOL bRegionChanged; - Region bClipRegion; TextAlign eTextAlign; - Region aClipReg; double fLineWidth; double fMiterLimit; @@ -166,16 +156,12 @@ private: SvStream* mpPS; const GDIMetaFile* pMTF; GDIMetaFile* pAMTF; // only created if Graphics is not a Metafile - MapMode aMapMode; VirtualDevice aVDev; double nBoundingX1; // this represents the bounding box double nBoundingY1; double nBoundingX2; double nBoundingY2; - - double fXScaling; // represents the factor of the current ( MapMode to 100THmm ) - double fYScaling; // StackMember* pGDIStack; ULONG mnCursorPos; // aktuelle Cursorposition im Output @@ -189,7 +175,6 @@ private: Color aTextFillColor; // Color aBackgroundColor; // BOOL bRegionChanged; - Region aClipRegion; TextAlign eTextAlign; // double fLineWidth; @@ -264,7 +249,7 @@ private: void ImplPolyPoly( const PolyPolygon & rPolyPolygon, sal_Bool bTextOutline = sal_False ); void ImplPolyLine( const Polygon & rPolygon ); - void ImplSetClipRegion(); + void ImplSetClipRegion( Region& rRegion ); void ImplBmp( Bitmap*, Bitmap*, const Point &, double nWidth, double nHeight ); void ImplGenerateBitmap( sal_Unicode nChar, sal_Int32 nResolution, VirtualDevice& rVirDev, const Point& rPos, const Size& rSize, sal_Int32 nWidth ); @@ -283,6 +268,7 @@ private: inline void ImplWriteTextFillColor( ULONG nMode = PS_RET ); void ImplWriteColor( ULONG nMode ); + double ImplGetScaling( const MapMode& ); void ImplGetMapMode( const MapMode& ); BOOL ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize ); BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSize ); @@ -350,7 +336,7 @@ BOOL PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, mnLevel = 2; mbGrayScale = FALSE; mbCompression = TRUE; - mnTextMode = 1; // default : export text as bitmap only when using non standard fonts + mnTextMode = 0; // default0 : export glyph outlines // try to get the dialog selection if ( pConfigItem ) @@ -374,10 +360,9 @@ BOOL PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, mbGrayScale = pConfigItem->ReadInt32( aColorStr, 1 ) == 2; mbCompression = pConfigItem->ReadInt32( aComprStr, 1 ) == 1; String sTextMode( RTL_CONSTASCII_USTRINGPARAM( "TextMode" ) ); - mnTextMode = pConfigItem->ReadInt32( sTextMode, 1 ); - if ( mnTextMode > 1 ) + mnTextMode = pConfigItem->ReadInt32( sTextMode, 0 ); + if ( mnTextMode > 2 ) mnTextMode = 0; - delete pResMgr; } } @@ -429,13 +414,10 @@ BOOL PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, pMTF = &rGraphic.GetGDIMetaFile(); else pMTF = pAMTF = new GDIMetaFile( rGraphic.GetGDIMetaFile() ); - - ImplGetMapMode( pMTF->GetPrefMapMode() ); aVDev.SetMapMode( pMTF->GetPrefMapMode() ); - nBoundingX1 = nBoundingY1 = 0; - nBoundingX2 = pMTF->GetPrefSize().Width() * fXScaling; - nBoundingY2 = pMTF->GetPrefSize().Height() * fYScaling; + nBoundingX2 = pMTF->GetPrefSize().Width(); + nBoundingY2 = pMTF->GetPrefSize().Height(); pGDIStack = NULL; aColor = Color( COL_TRANSPARENT ); @@ -452,7 +434,6 @@ BOOL PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, aBackgroundColor = Color( COL_WHITE ); eTextAlign = ALIGN_BASELINE; bRegionChanged = FALSE; - aClipRegion.SetEmpty(); nChrSet = 0x00; pChrSetList = NULL; @@ -512,8 +493,8 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview ) *mpPS << "%%BoundingBox: "; // BoundingBox ImplWriteLong( 0 ); ImplWriteLong( 0 ); - aMapMode = MapMode( pMTF->GetPrefMapMode() ); - Size aSizePoint = Application::GetDefaultDevice()->LogicToLogic( pMTF->GetPrefSize(), aMapMode, MAP_POINT ); + Size aSizePoint = Application::GetDefaultDevice()->LogicToLogic( pMTF->GetPrefSize(), + pMTF->GetPrefMapMode(), MAP_POINT ); ImplWriteLong( aSizePoint.Width() ); ImplWriteLong( aSizePoint.Height() ,PS_RET ); ImplWriteLine( "%%Pages: 0" ); @@ -632,8 +613,11 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview ) ImplWriteLine( "%%BeginPageSetup" ); ImplWriteLine( "%%EndPageSetup" ); ImplWriteLine( "pum" ); - ImplScale( (double)aSizePoint.Width() / (double)nBoundingX2, (double)aSizePoint.Height() / (double)nBoundingY2 ); - ImplTranslate( 0, - nBoundingY2 ); + ImplScale( (double)aSizePoint.Width() / (double)pMTF->GetPrefSize().Width(), (double)aSizePoint.Height() / (double)pMTF->GetPrefSize().Height() ); + ImplWriteDouble( 0 ); + ImplWriteDouble( -pMTF->GetPrefSize().Height() ); + ImplWriteLine( "t" ); + ImplWriteLine( "/tm matrix currentmatrix def" ); } //--------------------------------------------------------------------------------- @@ -912,7 +896,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) VirtualDevice aVDev; GDIMetaFile aTmpMtf; - aVDev.SetMapMode( aMapMode ); + aVDev.SetMapMode( rVDev.GetMapMode() ); aVDev.AddHatchActions( ( (const MetaHatchAction*)pMA)->GetPolyPolygon(), ( (const MetaHatchAction*)pMA )->GetHatch(), aTmpMtf ); ImplWriteActions( aTmpMtf, rVDev ); @@ -963,44 +947,37 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) case META_ISECTRECTCLIPREGION_ACTION: { const MetaISectRectClipRegionAction* pA = (const MetaISectRectClipRegionAction*) pMA; - if ( aClipRegion.IsEmpty() ) - aClipRegion = pA->GetRect(); - else - aClipRegion.Intersect( pA->GetRect() ); - bRegionChanged = TRUE; - ImplSetClipRegion(); + Region aRegion( pA->GetRect() ); + ImplSetClipRegion( aRegion ); } break; case META_CLIPREGION_ACTION: { const MetaClipRegionAction* pA = (const MetaClipRegionAction*) pMA; - bRegionChanged = TRUE; - aClipRegion = pA->GetRegion(); - ImplSetClipRegion(); + Region aRegion( pA->GetRegion() ); + ImplSetClipRegion( aRegion ); } break; case META_ISECTREGIONCLIPREGION_ACTION: { const MetaISectRegionClipRegionAction* pA = (const MetaISectRegionClipRegionAction*) pMA; - if ( aClipRegion.IsEmpty() ) - aClipRegion = pA->GetRegion(); - else - aClipRegion.Intersect( pA->GetRegion() ); - bRegionChanged = TRUE; - ImplSetClipRegion(); + Region aRegion( pA->GetRegion() ); + ImplSetClipRegion( aRegion ); } break; case META_MOVECLIPREGION_ACTION: { +/* if ( !aClipRegion.IsEmpty() ) { const MetaMoveClipRegionAction* pA = (const MetaMoveClipRegionAction*) pMA; aClipRegion.Move( pA->GetHorzMove(), pA->GetVertMove() ); ImplSetClipRegion(); } +*/ } break; @@ -1055,20 +1032,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) case META_MAPMODE_ACTION : { pMA->Execute( &rVDev ); - aMapMode = ( (const MetaMapModeAction*) pMA )->GetMapMode(); - - if( aMapMode.GetMapUnit() == MAP_RELATIVE ) - { - fXScaling *= (double)aMapMode.GetScaleX(); - fYScaling *= (double)aMapMode.GetScaleY(); - sal_Int32 nXOffset = aMapMode.GetOrigin().X(); - sal_Int32 nYOffset = aMapMode.GetOrigin().Y(); - ImplTranslate( (double)nXOffset * fXScaling, (double)nYOffset * fYScaling ); - if ( !aClipRegion.IsEmpty() ) - aClipRegion.Move( -nXOffset, -nYOffset ); - } - else - ImplGetMapMode( aMapMode ); + ImplGetMapMode( rVDev.GetMapMode() ); } break; @@ -1100,13 +1064,8 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) pGS->bTextFillCol = bTextFillColor; pGS->aTextFillCol = aTextFillColor; pGS->aBackgroundCol = aBackgroundColor; - pGS->bRegionChanged = bRegionChanged; - pGS->aClipReg = aClipRegion; - pGS->aMapMode = aMapMode; bRegionChanged = FALSE; pGS->aFont = maFont; - pGS->fXScale = fXScaling; - pGS->fYScale = fYScaling; mnLatestPush = mpPS->Tell(); ImplWriteLine( "gs" ); } @@ -1120,11 +1079,6 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) { pGS = pGDIStack; pGDIStack = pGS->pSucc; - if ( aMapMode != pGS->aMapMode ) - { - aMapMode = pGS->aMapMode; - ImplGetMapMode( aMapMode ); - } aDashArray = pGS->aDashArray; eJoinType = pGS->eJoinType; eLineCap = pGS->eLineCap; @@ -1140,18 +1094,10 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) bTextFillColor = pGS->bTextFillCol; aTextFillColor = pGS->aTextFillCol; aBackgroundColor = pGS->aBackgroundCol; - if ( bRegionChanged ) - { - aClipRegion = pGS->aClipReg; - ImplSetClipRegion(); - } - bRegionChanged = pGS->bRegionChanged; maFont = pGS->aFont; maLastFont = Font(); // set maLastFont != maFont -> so that - fXScaling = pGS->fXScale; - fYScaling = pGS->fYScale; delete pGS; - UINT32 nCurrentPos = mpPS->Tell(); + sal_uInt32 nCurrentPos = mpPS->Tell(); if ( nCurrentPos - 3 == mnLatestPush ) { mpPS->Seek( mnLatestPush ); @@ -1167,6 +1113,8 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) case META_EPS_ACTION : { GfxLink aGfxLink = ( (const MetaEPSAction*) pMA )->GetLink(); + const GDIMetaFile aSubstitute( ( ( const MetaEPSAction*) pMA )->GetSubstitute() ); + BOOL bLevelConflict = FALSE; BYTE* pSource = (BYTE*) aGfxLink.GetData(); ULONG nSize = aGfxLink.GetDataSize(); @@ -1205,11 +1153,17 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) { Point aPoint = ( (const MetaEPSAction*) pMA )->GetPoint(); Size aSize = ( (const MetaEPSAction*) pMA )->GetSize(); - double fXScale = (double)aSize.Width() * (double)fXScaling / ( nBoundingBox[ 2 ] - nBoundingBox[ 0 ] ); - double fYScale = (double)aSize.Height() * (double)fYScaling / ( nBoundingBox[ 3 ] - nBoundingBox[ 1 ] ); - ImplWriteLine( "gs\n%%BeginDocument:" ); - ImplTranslate( aPoint.X() * fXScaling, aPoint.Y() * fYScaling + nBoundingBox[ 3 ] * fYScale ); - ImplScale( fXScale, fYScale ); + + MapMode aMapMode( aSubstitute.GetPrefMapMode() ); + Size aOutSize( rVDev.LogicToLogic( aSize, rVDev.GetMapMode(), aMapMode ) ); + Point aOrigin( rVDev.LogicToLogic( aPoint, rVDev.GetMapMode(), aMapMode ) ); + aOrigin.Y() += aOutSize.Height(); + aMapMode.SetOrigin( aOrigin ); + aMapMode.SetScaleX( aOutSize.Width() / ( nBoundingBox[ 2 ] - nBoundingBox[ 0 ] ) ); + aMapMode.SetScaleY( aOutSize.Height() / ( nBoundingBox[ 3 ] - nBoundingBox[ 1 ] ) ); + ImplWriteLine( "gs" ); + ImplGetMapMode( aMapMode ); + ImplWriteLine( "%%BeginDocument:" ); mpPS->Write( pSource, aGfxLink.GetDataSize() ); ImplWriteLine( "%%EndDocument\ngr" ); } @@ -1325,10 +1279,6 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) bSkipSequence = sal_False; if ( bSkipSequence ) { - fStrokeWidth *= fXScaling > fYScaling ? fXScaling : fYScaling; - sal_uInt32 j, i = aDashArray.size(); - for ( j = 0; j < i; j++ ) - aDashArray[ j ] *= fXScaling > fYScaling ? fXScaling : fYScaling; ImplWriteLineInfo( fStrokeWidth, aStroke.getMiterLimit(), aStroke.getCapType(), eJT, aDashArray ); ImplPolyLine( aPath ); @@ -1463,8 +1413,8 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) inline void PSWriter::ImplWritePoint( const Point& rPoint, sal_uInt32 nMode ) { - ImplWriteDouble( rPoint.X() * fXScaling ); - ImplWriteDouble( rPoint.Y() * fYScaling, nMode ); + ImplWriteDouble( rPoint.X() ); + ImplWriteDouble( rPoint.Y(), nMode ); } //--------------------------------------------------------------------------------- @@ -1500,13 +1450,10 @@ void PSWriter::ImplCurveTo( const Point& rP1, const Point& rP2, const Point& rP3 void PSWriter::ImplTranslate( const double& fX, const double& fY, sal_uInt32 nMode ) { - if ( ( fX != 0.0 ) || ( fY != 0.0 ) ) - { - ImplWriteDouble( fX ); - ImplWriteDouble( fY ); - ImplWriteByte( 't' ); - ImplExecMode( nMode ); - } + ImplWriteDouble( fX ); + ImplWriteDouble( fY ); + ImplWriteByte( 't' ); + ImplExecMode( nMode ); } //--------------------------------------------------------------------------------- @@ -1527,9 +1474,8 @@ void PSWriter::ImplRect( const Rectangle & rRect ) ImplRectFill( rRect ); if ( bLineColor ) { - - double nWidth = rRect.GetWidth() * fXScaling; - double nHeight = rRect.GetHeight() * fYScaling; + double nWidth = rRect.GetWidth(); + double nHeight = rRect.GetHeight(); ImplWriteLineColor( PS_SPACE ); ImplMoveTo( rRect.TopLeft() ); @@ -1549,8 +1495,8 @@ void PSWriter::ImplRect( const Rectangle & rRect ) void PSWriter::ImplRectFill( const Rectangle & rRect ) { - double nWidth = rRect.GetWidth() * fXScaling; - double nHeight = rRect.GetHeight() * fYScaling; + double nWidth = rRect.GetWidth(); + double nHeight = rRect.GetHeight(); ImplWriteFillColor( PS_SPACE ); ImplMoveTo( rRect.TopLeft() ); @@ -1614,7 +1560,7 @@ void PSWriter::ImplWriteGradient( const PolyPolygon& rPolyPoly, const Gradient& { VirtualDevice aVDev; GDIMetaFile aTmpMtf; - aVDev.SetMapMode( aMapMode ); + aVDev.SetMapMode( rVDev.GetMapMode() ); aVDev.AddGradientActions( rPolyPoly.GetBoundRect(), rGradient, aTmpMtf ); ImplWriteActions( aTmpMtf, rVDev ); } @@ -1696,19 +1642,19 @@ void PSWriter::ImplPolyLine( const Polygon & rPoly ) //--------------------------------------------------------------------------------- -void PSWriter::ImplSetClipRegion() +void PSWriter::ImplSetClipRegion( Region& rClipRegion ) { - if ( !aClipRegion.IsEmpty() ) + if ( !rClipRegion.IsEmpty() ) { Rectangle aRect; - RegionHandle hRegionHandle = aClipRegion.BeginEnumRects(); + RegionHandle hRegionHandle = rClipRegion.BeginEnumRects(); - while ( aClipRegion.GetNextEnumRect( hRegionHandle, aRect ) ) + while ( rClipRegion.GetNextEnumRect( hRegionHandle, aRect ) ) { - double nX1 = aRect.Left() * fXScaling; - double nY1 = aRect.Top() * fYScaling; - double nX2 = aRect.Right() * fXScaling; - double nY2 = aRect.Bottom() * fYScaling; + double nX1 = aRect.Left(); + double nY1 = aRect.Top(); + double nX2 = aRect.Right(); + double nY2 = aRect.Bottom(); ImplWriteDouble( nX1 ); ImplWriteDouble( nY1 ); ImplWriteByte( 'm' ); @@ -1725,7 +1671,7 @@ void PSWriter::ImplSetClipRegion() ImplWriteDouble( nY1 ); ImplWriteByte( 'l', PS_SPACE | PS_WRAP ); }; - aClipRegion.EndEnumRects( hRegionHandle ); + rClipRegion.EndEnumRects( hRegionHandle ); ImplWriteLine( "eoclip newpath" ); } } @@ -1792,12 +1738,8 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi if ( bDoTrans ) { ImplWriteLine( "gs\npum" ); - ImplTranslate( aSourcePos.X() * fXScaling, - ( -aSourcePos.Y() * fYScaling ) ); - ImplScale( nXWidth * fXScaling / nWidth, nYHeight * fYScaling / nHeight ); - if ( !aClipRegion.IsEmpty() ) - { - // aRegion.Intersect( aClipRegion ); - } + ImplTranslate( aSourcePos.X(), aSourcePos.Y() ); + ImplScale( nXWidth / nWidth, nYHeight / nHeight ); RegionHandle hRegionHandle = aRegion.BeginEnumRects(); while ( aRegion.GetNextEnumRect( hRegionHandle, aRect ) ) @@ -1826,8 +1768,8 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi if (!bDoTrans ) ImplWriteLine( "pum" ); - ImplTranslate( aSourcePos.X() * fXScaling, - ( -aSourcePos.Y() * fYScaling - nYHeight * fYScaling ) ); - ImplScale( nXWidth * fXScaling, nYHeight * fYScaling ); + ImplTranslate( aSourcePos.X(), aSourcePos.Y() + nYHeight ); + ImplScale( nXWidth, nYHeight ); if ( mnLevel == 1 ) // level 1 is always grayscale !!! { ImplWriteLong( nWidth ); @@ -2064,8 +2006,8 @@ void PSWriter::ImplWriteString( const ByteString& rString, VirtualDevice& rVDev, for( i = 0; i < nLen; i++ ) { if ( i > 0 ) - nx = pDXArry[ i - 1 ] * fXScaling; - ImplWriteDouble( ( bStretch ) ? nx : rVDev.GetTextWidth( rString.GetChar( i ) ) * fXScaling ); + nx = pDXArry[ i - 1 ]; + ImplWriteDouble( ( bStretch ) ? nx : rVDev.GetTextWidth( rString.GetChar( i ) ) ); ImplWriteDouble( nx ); ImplWriteLine( "(", PS_NONE ); ImplWriteCharacter( rString.GetChar( i ) ); @@ -2090,14 +2032,14 @@ void PSWriter::ImplGenerateBitmap( sal_Unicode nChar, sal_Int32 nTextResolution, Point aEmptyPoint( 0, 0 ); Fraction aFract( 1, nTextResolution ); MapMode aMapModeInch( MAP_INCH, aEmptyPoint, aFract, aFract ); - Size aSizePixel = OutputDevice::LogicToLogic( rSize, aMapMode, aMapModeInch ); + Size aSizePixel = OutputDevice::LogicToLogic( rSize, rVirDev.GetMapMode(), aMapModeInch ); Color aTextColor( COL_BLACK ); rVirDev.SetTextColor( aTextColor ); rVirDev.SetTextAlign( ALIGN_TOP ); - const Size aOutSize( rVirDev.PixelToLogic( aSizePixel, aMapMode ) ); + const Size aOutSize( rVirDev.PixelToLogic( aSizePixel, rVirDev.GetMapMode() ) ); rVirDev.SetOutputSize( aOutSize ); - MapMode aScaledMapMode( aMapMode ); + MapMode aScaledMapMode( rVirDev.GetMapMode() ); Fraction aFracX = aScaledMapMode.GetScaleX(); Fraction aFracY = aScaledMapMode.GetScaleY(); aFracX *= Fraction( aOutSize.Width(), rSize.Width() ); @@ -2112,7 +2054,6 @@ void PSWriter::ImplGenerateBitmap( sal_Unicode nChar, sal_Int32 nTextResolution, else rVirDev.DrawTextArray( aEmptyPoint, aUniString, NULL ); - rVirDev.SetMapMode( aMapMode ); Bitmap aBmp = rVirDev.GetBitmap( aEmptyPoint, aOutSize ); // aBmp is a bitmap of the whole text in nTextResolution dpi Bitmap aMask( aBmp ); @@ -2130,16 +2071,13 @@ void PSWriter::ImplText( const String& rUniString, const Point& rPos, const INT3 sal_uInt16 nLen = rUniString.Len(); if ( !nLen ) return; - sal_Bool bGlyph = sal_False; - if ( mnTextMode == 0 ) - bGlyph = sal_True; - if ( bGlyph ) + if ( mnTextMode == 0 ) // using glpyh outlines { Font aNotRotatedFont( maFont ); aNotRotatedFont.SetOrientation( 0 ); VirtualDevice aVirDev( 1 ); - aVirDev.SetMapMode( aMapMode ); + aVirDev.SetMapMode( rVDev.GetMapMode() ); aVirDev.SetFont( aNotRotatedFont ); sal_Int16 nRotation = maFont.GetOrientation(); @@ -2158,9 +2096,11 @@ void PSWriter::ImplText( const String& rUniString, const Point& rPos, const INT3 std::vector<PolyPolygon> aPolyPolyVec; if ( aVirDev.GetTextOutlines( aPolyPolyVec, rUniString ) ) { - ImplWriteLine( "pum" ); // always adjust text position to match baseline alignment - ImplTranslate( aPos.X() * fXScaling, aPos.Y() * fYScaling ); + ImplWriteLine( "pum" ); + ImplWriteDouble( aPos.X() ); + ImplWriteDouble( aPos.Y() ); + ImplWriteLine( "t" ); if ( nRotation ) { ImplWriteF( nRotation, 1 ); @@ -2172,11 +2112,11 @@ void PSWriter::ImplText( const String& rUniString, const Point& rPos, const INT3 ImplWriteLine( "pom" ); } bLineColor = bOldLineColor; -// else -// ImplGenerateBitmap( nChar, 300, aVirDev, aPos, aSize, nWidth ); } - else + else if ( ( mnTextMode == 1 ) || ( mnTextMode == 2 ) ) // normal text output { + if ( mnTextMode == 2 ) // forcing output one complete text packet, by + pDXArry = NULL; // ignoring the kerning array ImplSetAttrForText( rPos ); ByteString aStr( rUniString, maFont.GetCharSet() ); ImplWriteString( aStr, rVDev, pDXArry, nWidth != 0 ); @@ -2209,7 +2149,7 @@ void PSWriter::ImplSetAttrForText( const Point& rPoint ) maLastFont = maFont; aSize = maFont.GetSize(); - ImplWriteDouble( aSize.Height() * fYScaling ); ///??????????????????? + ImplWriteDouble( aSize.Height() ); *mpPS << "sf "; } if ( eTextAlign != ALIGN_BASELINE ) @@ -2328,54 +2268,60 @@ void PSWriter::ImplWriteColor( ULONG nMode ) //--------------------------------------------------------------------------------- -void PSWriter::ImplGetMapMode( const MapMode& aMapMode ) +double PSWriter::ImplGetScaling( const MapMode& rMapMode ) { double nMul; - switch ( aMapMode.GetMapUnit() ) + switch ( rMapMode.GetMapUnit() ) { case MAP_PIXEL : case MAP_SYSFONT : case MAP_APPFONT : case MAP_100TH_MM : - nMul = 1 * EPS_SCALING_FAKTOR; + nMul = 1; break; case MAP_10TH_MM : - nMul = 10 * EPS_SCALING_FAKTOR; + nMul = 10; break; case MAP_MM : - nMul = 100 * EPS_SCALING_FAKTOR; + nMul = 100; break; case MAP_CM : - nMul = 1000 * EPS_SCALING_FAKTOR; + nMul = 1000; break; case MAP_1000TH_INCH : - nMul = 2.54 * EPS_SCALING_FAKTOR; + nMul = 2.54; break; case MAP_100TH_INCH : - nMul = 25.4 * EPS_SCALING_FAKTOR; + nMul = 25.4; break; case MAP_10TH_INCH : - nMul = 254 * EPS_SCALING_FAKTOR; + nMul = 254; break; case MAP_INCH : - nMul = 2540 * EPS_SCALING_FAKTOR; + nMul = 2540; break; case MAP_TWIP : - nMul = 1,76388889 * EPS_SCALING_FAKTOR; + nMul = 1,76388889; break; case MAP_POINT : - nMul = 35,27777778 * EPS_SCALING_FAKTOR; + nMul = 35,27777778; break; default: nMul = 1.0; break; } - ImplTranslate( aMapMode.GetOrigin().X() * nMul, aMapMode.GetOrigin().Y() * nMul ); - double nScale = aMapMode.GetScaleX(); - fXScaling = nMul * nScale; - nScale = aMapMode.GetScaleY(); - fYScaling = nMul * nScale; + return nMul; +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplGetMapMode( const MapMode& rMapMode ) +{ + ImplWriteLine( "tm setmatrix" ); + double nMul = ImplGetScaling( rMapMode ); + ImplTranslate( rMapMode.GetOrigin().X() * nMul, rMapMode.GetOrigin().Y() * nMul ); + ImplScale( nMul * (double)rMapMode.GetScaleX(), nMul * (double)rMapMode.GetScaleY() ); } //--------------------------------------------------------------------------------- @@ -2468,7 +2414,7 @@ void PSWriter::ImplWriteLineInfo( const LineInfo& rLineInfo ) SvtGraphicStroke::DashArray aDashArray; if ( rLineInfo.GetStyle() == LINE_DASH ) aDashArray.push_back( 2 ); - double fLWidth = ( ( rLineInfo.GetWidth() + 1 ) * fXScaling + ( rLineInfo.GetWidth() + 1 ) * fYScaling ) * 0.5; + double fLWidth = ( ( rLineInfo.GetWidth() + 1 ) + ( rLineInfo.GetWidth() + 1 ) ) * 0.5; ImplWriteLineInfo( fLWidth, 10.0, SvtGraphicStroke::capButt, SvtGraphicStroke::joinMiter, aDashArray ); } diff --git a/goodies/source/filter.vcl/eps/epsstr.src b/goodies/source/filter.vcl/eps/epsstr.src index d71943dedb64..882e96a62c7d 100644 --- a/goodies/source/filter.vcl/eps/epsstr.src +++ b/goodies/source/filter.vcl/eps/epsstr.src @@ -2,9 +2,9 @@ * * $RCSfile: epsstr.src,v $ * - * $Revision: 1.32 $ + * $Revision: 1.33 $ * - * last change: $Author: obo $ $Date: 2001-12-14 16:51:49 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -74,21 +74,22 @@ String KEY_VERSION_CHECK Text[ danish ] = "Advarsel: Det var ikke muligt at gemme alle importerede EPS-billeder p niveau1,\nfordi nogle foreligger p et hjere niveau !"; Text[ french ] = "Attention : Les graphiques EPS imports n'ont pas tous pu tre enregistrs au niveau1\ncar certains d'entre eux sont d'un niveau suprieur !"; Text[ swedish ] = "OBS: All importerad EPS-grafik kunde inte sparas p Level1,\neftersom en del finns p en hgre niv !"; - Text[ dutch ] = "Pas op: Niet alle gemporteerde EPS-afbeeldingen konden onder Level1 worden opgeslagen,\ndaar enkele ervan op een hoger level liggen !"; - Text[ spanish ] = "Atencin: No han podido ser guardados en Level1 todos los grficos EPS importados\nporque existen algunos en un nivel ms alto!"; + Text[ dutch ] = "Let op: niet alle gemporteerde EPS-afbeeldingen kunnen onder Niveau1 worden opgeslagen,\nomdat enkele zich op een hoger niveau bevinden!"; + Text[ spanish ] = "Atencin: No todos los grficos EPS importados se han podido guardar en el Level1\nya que algunos son de un nivel superior!"; Text[ english_us ] = "Warning: Not all of the imported EPS graphics could be saved at level1\nas some are at a higher level!"; Text[ chinese_simplified ] = "注意: 无法将所有的输入图形以\"级别 1\"存盘,\n因为一些图形是高于\"级别 1\" !"; - Text[ russian ] = "! EPS 1 ,\n !"; + Text[ russian ] = "! EPS 1 ,\n !"; Text[ polish ] = "Uwaga: Nie wszystkie importowane grafiki EPS mogy zosta zapisane na poziomie1, \nponiewa niektre znajduj si na wyszym poziomie!"; Text[ japanese ] = "注意: インポートされた EPS 画像のいくつかは、一つ上のレベルにあり\nにすべてをレベル1格納できませんでした。"; Text[ greek ] = ": EPS,\n ? "; - Text[ korean ] = "주의: 일부 그래픽이 상위 레벨에 있어 \n가져온 EPS 그래픽 모두를 레벨 1에 저장할 수는 없었습니다."; + Text[ korean ] = "주의: 일부 그림이 상위 수준에 있어 \n가져온 EPS 그림 모두를 수준 1에 저장할 수 없습니다."; Text[ chinese_traditional ] = "註意:無法將所有的匯入圖形以 level 1 儲存﹐\n因為一些圖形高於 level 1 !"; Text[ arabic ] = ": EPS 1\n !"; Text[ turkish ] = "Dikkat: Baz EPS grafikleri daha st dzeyde olduu iin, ie aktarlan tm grafikler dzey 1'e kaydedilemedi."; Text[ language_user1 ] = " "; Text[ finnish ] = "Varoitus: Kaikkien tuotujen EPS-kuvien tallentaminen ei onnistunut tasolla 1,\nkoska joidenkin kuvien taso on korkeampi."; Text[ catalan ] = "Advertiment: No s'han pogut desar al nivell1 tots els grfics EPS importats\nja que alguns sn a un nivell superior!"; + Text[ thai ] = "คำเตือน: ไม่สามารถบันทึกการนำเข้ากราฟิค EPS ทั้งหมดที่ระดับ1\n เป็นบางส่วนที่ระดับสูงขึ้น!"; }; @@ -106,3 +107,7 @@ String KEY_VERSION_CHECK + + + + diff --git a/goodies/source/filter.vcl/eps/makefile.mk b/goodies/source/filter.vcl/eps/makefile.mk index 41e9b066281a..b5ee838b63b1 100644 --- a/goodies/source/filter.vcl/eps/makefile.mk +++ b/goodies/source/filter.vcl/eps/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.4 $ +# $Revision: 1.5 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:03 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:13 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -114,7 +114,6 @@ SHL1BASE=0x1c000000 all: ALLTAR -# THB: exports list goodies checked for 6.0 Final 6.12.2001 .IF "$(GUI)" == "OS2" $(MISC)$/$(SHL1TARGET).def:\ diff --git a/goodies/source/filter.vcl/eras/makefile.mk b/goodies/source/filter.vcl/eras/makefile.mk index 99120f6e64b7..98987fb1a5ac 100644 --- a/goodies/source/filter.vcl/eras/makefile.mk +++ b/goodies/source/filter.vcl/eras/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.5 $ +# $Revision: 1.6 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:03 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:14 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -100,7 +100,6 @@ SHL1BASE=0x1c000000 .INCLUDE : target.mk -# THB: exports list goodies checked for 6.0 Final 6.12.2001 .IF "$(GUI)"=="WNT" $(MISC)$/$(SHL1TARGET).def: makefile.mk diff --git a/goodies/source/filter.vcl/etiff/makefile.mk b/goodies/source/filter.vcl/etiff/makefile.mk index 29ff3a33d6c7..6c85aeec3f1b 100644 --- a/goodies/source/filter.vcl/etiff/makefile.mk +++ b/goodies/source/filter.vcl/etiff/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.5 $ +# $Revision: 1.6 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:03 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:14 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -100,7 +100,6 @@ SHL1BASE=0x1c000000 .INCLUDE : target.mk -# THB: exports list goodies checked for 6.0 Final 6.12.2001 .IF "$(GUI)"=="WNT" $(MISC)$/$(SHL1TARGET).def: makefile.mk diff --git a/goodies/source/filter.vcl/expm/makefile.mk b/goodies/source/filter.vcl/expm/makefile.mk index dbd54930a493..092a4b3181e7 100644 --- a/goodies/source/filter.vcl/expm/makefile.mk +++ b/goodies/source/filter.vcl/expm/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.5 $ +# $Revision: 1.6 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:03 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:15 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -100,7 +100,6 @@ SHL1BASE=0x1c000000 .INCLUDE : target.mk -# THB: exports list goodies checked for 6.0 Final 6.12.2001 .IF "$(GUI)"=="WNT" $(MISC)$/$(SHL1TARGET).def: makefile.mk diff --git a/goodies/source/filter.vcl/icgm/cgm.cxx b/goodies/source/filter.vcl/icgm/cgm.cxx index aa227ade092d..dd188e3eac45 100644 --- a/goodies/source/filter.vcl/icgm/cgm.cxx +++ b/goodies/source/filter.vcl/icgm/cgm.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cgm.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: sj $ $Date: 2002-02-08 09:32:40 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:15 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -940,70 +940,80 @@ SvStream& operator>>( SvStream& rOStm, CGM& rCGM ) extern "C" sal_uInt32 __LOADONCALLAPI ImportCGM( String& rFileName, uno::Reference< frame::XModel > & rXModel, sal_uInt32 nMode, void* pProgressBar ) { - sal_Bool bProgressBar = sal_False; - CGM* pCGM; // retvalue == 0 -> ERROR - sal_uInt32 nStatus = 0; // == 0xffrrggbb -> background color in the lower 24 bits + sal_uInt32 nStatus = 0; // retvalue == 0 -> ERROR + // == 0xffrrggbb -> background color in the lower 24 bits + sal_Bool bProgressBar = sal_False; if( rXModel.is() ) { - pCGM = new CGM( nMode, rXModel ); - if ( pCGM && pCGM->IsValid() ) + SvStream* pIn = NULL; + CGM* pCGM= NULL; + + try { - if ( nMode & CGM_IMPORT_CGM ) + pCGM = new CGM( nMode, rXModel ); + if ( pCGM && pCGM->IsValid() ) { - SvStream* pIn = ::utl::UcbStreamHelper::CreateStream( rFileName, STREAM_READ ); - if ( pIn ) + if ( nMode & CGM_IMPORT_CGM ) { - pIn->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); - pIn->Seek( STREAM_SEEK_TO_END ); - sal_uInt32 nInSize = pIn->Tell(); - pIn->Seek( 0 ); + SvStream* pIn = ::utl::UcbStreamHelper::CreateStream( rFileName, STREAM_READ ); + if ( pIn ) + { + pIn->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + pIn->Seek( STREAM_SEEK_TO_END ); + sal_uInt32 nInSize = pIn->Tell(); + pIn->Seek( 0 ); #ifdef CGM_EXPORT_IMPRESS - uno::Reference< task::XStatusIndicator > aXStatInd; - sal_uInt32 nNext = 0; - sal_uInt32 nAdd = nInSize / 20; - if ( pProgressBar ) - aXStatInd = *(uno::Reference< task::XStatusIndicator > *)pProgressBar; - bProgressBar = aXStatInd.is(); - if ( bProgressBar ) - aXStatInd->start( rtl::OUString::createFromAscii("CGM Import"), nInSize ); + uno::Reference< task::XStatusIndicator > aXStatInd; + sal_uInt32 nNext = 0; + sal_uInt32 nAdd = nInSize / 20; + if ( pProgressBar ) + aXStatInd = *(uno::Reference< task::XStatusIndicator > *)pProgressBar; + bProgressBar = aXStatInd.is(); + if ( bProgressBar ) + aXStatInd->start( rtl::OUString::createFromAscii("CGM Import"), nInSize ); #endif - while ( pCGM->IsValid() && ( pIn->Tell() < nInSize ) && !pCGM->IsFinished() ) - { + while ( pCGM->IsValid() && ( pIn->Tell() < nInSize ) && !pCGM->IsFinished() ) + { #ifdef CGM_EXPORT_IMPRESS - if ( bProgressBar ) - { - sal_uInt32 nCurrentPos = pIn->Tell(); - if ( nCurrentPos >= nNext ) + if ( bProgressBar ) { - aXStatInd->setValue( nCurrentPos ); - nNext = nCurrentPos + nAdd; + sal_uInt32 nCurrentPos = pIn->Tell(); + if ( nCurrentPos >= nNext ) + { + aXStatInd->setValue( nCurrentPos ); + nNext = nCurrentPos + nAdd; + } } - } #endif - if ( pCGM->Write( *pIn ) == sal_False ) - break; - } - if ( pCGM->IsValid() ) - { - nStatus = pCGM->GetBackGroundColor() | 0xff000000; - } - delete pIn; + if ( pCGM->Write( *pIn ) == sal_False ) + break; + } + if ( pCGM->IsValid() ) + { + nStatus = pCGM->GetBackGroundColor() | 0xff000000; + } #ifdef CGM_EXPORT_IMPRESS - if ( bProgressBar ) - aXStatInd->end(); + if ( bProgressBar ) + aXStatInd->end(); #endif + } } } } + catch( ::com::sun::star::uno::Exception& ) + { + nStatus = 0; + } delete pCGM; + delete pIn; } return nStatus; } diff --git a/goodies/source/filter.vcl/idxf/makefile.mk b/goodies/source/filter.vcl/idxf/makefile.mk index 88a9ea82d347..f376c658100c 100644 --- a/goodies/source/filter.vcl/idxf/makefile.mk +++ b/goodies/source/filter.vcl/idxf/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.5 $ +# $Revision: 1.6 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:04 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:16 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -108,7 +108,6 @@ SHL1BASE=0x1c000000 .INCLUDE : target.mk -# THB: exports list goodies checked for 6.0 Final 6.12.2001 .IF "$(GUI)"=="WNT" $(MISC)$/$(SHL1TARGET).def: makefile.mk diff --git a/goodies/source/filter.vcl/ieps/makefile.mk b/goodies/source/filter.vcl/ieps/makefile.mk index 5279abdeaf01..74a6e1963c02 100644 --- a/goodies/source/filter.vcl/ieps/makefile.mk +++ b/goodies/source/filter.vcl/ieps/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.5 $ +# $Revision: 1.6 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:04 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:16 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -100,7 +100,6 @@ SHL1BASE=0x1c000000 .INCLUDE : target.mk -# THB: exports list goodies checked for 6.0 Final 6.12.2001 .IF "$(GUI)"=="WNT" $(MISC)$/$(SHL1TARGET).def: makefile.mk diff --git a/goodies/source/filter.vcl/ios2met/makefile.mk b/goodies/source/filter.vcl/ios2met/makefile.mk index 4088aeac4fe6..bbdb2651137a 100644 --- a/goodies/source/filter.vcl/ios2met/makefile.mk +++ b/goodies/source/filter.vcl/ios2met/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.5 $ +# $Revision: 1.6 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:04 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:16 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -101,7 +101,6 @@ SHL1BASE=0x1c000000 .INCLUDE : target.mk -# THB: exports list goodies checked for 6.0 Final 6.12.2001 .IF "$(GUI)"=="WNT" $(MISC)$/$(SHL1TARGET).def: makefile.mk diff --git a/goodies/source/filter.vcl/ipbm/makefile.mk b/goodies/source/filter.vcl/ipbm/makefile.mk index f5b5da67db4f..ccf6c152c010 100644 --- a/goodies/source/filter.vcl/ipbm/makefile.mk +++ b/goodies/source/filter.vcl/ipbm/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.5 $ +# $Revision: 1.6 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:04 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:17 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -100,7 +100,6 @@ SHL1BASE=0x1c000000 .INCLUDE : target.mk -# THB: exports list goodies checked for 6.0 Final 6.12.2001 .IF "$(GUI)"=="WNT" $(MISC)$/$(SHL1TARGET).def: makefile.mk diff --git a/goodies/source/filter.vcl/ipcd/makefile.mk b/goodies/source/filter.vcl/ipcd/makefile.mk index 2d31332b8066..28dab569687c 100644 --- a/goodies/source/filter.vcl/ipcd/makefile.mk +++ b/goodies/source/filter.vcl/ipcd/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.7 $ +# $Revision: 1.8 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:04 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:17 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -101,7 +101,6 @@ SHL1BASE=0x1c000000 .INCLUDE : target.mk -# THB: exports list goodies checked for 6.0 Final 6.12.2001 .IF "$(GUI)"=="WNT" $(MISC)$/$(SHL1TARGET).def: makefile.mk diff --git a/goodies/source/filter.vcl/ipcx/makefile.mk b/goodies/source/filter.vcl/ipcx/makefile.mk index da772de70e04..c5028c90e0bd 100644 --- a/goodies/source/filter.vcl/ipcx/makefile.mk +++ b/goodies/source/filter.vcl/ipcx/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.5 $ +# $Revision: 1.6 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:04 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:17 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -100,8 +100,6 @@ SHL1BASE=0x1c000000 .INCLUDE : target.mk -# THB: exports list goodies checked for 6.0 Final 6.12.2001 -# THB: exports list goodies checked for 6.0 Final 6.12.2001 .IF "$(GUI)"=="WNT" $(MISC)$/$(SHL1TARGET).def: makefile.mk diff --git a/goodies/source/filter.vcl/ipict/ipict.cxx b/goodies/source/filter.vcl/ipict/ipict.cxx index 89216d8f9044..0cd0b5dc5389 100644 --- a/goodies/source/filter.vcl/ipict/ipict.cxx +++ b/goodies/source/filter.vcl/ipict/ipict.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ipict.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: sj $ $Date: 2002-10-31 11:32:29 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1270,10 +1270,7 @@ ULONG PictReader::ReadData(USHORT nOpcode) case 0x000d: // TxSize { *pPict >> nUSHORT; - - long nTemp = Max( (long) ( Fraction( (long) nUSHORT ) * aVRes ), 12L ); - aActFont.SetSize( Size( 0, nTemp ) ); - + aActFont.SetSize( Size( 0, (long) ( Fraction( (long) nUSHORT ) * aVRes ) ) ); eActMethod=PDM_UNDEFINED; nDataSize=2; } diff --git a/goodies/source/filter.vcl/ipict/makefile.mk b/goodies/source/filter.vcl/ipict/makefile.mk index 7dbaefac5913..83d2aeaef8e9 100644 --- a/goodies/source/filter.vcl/ipict/makefile.mk +++ b/goodies/source/filter.vcl/ipict/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.5 $ +# $Revision: 1.6 $ # -# last change: $Author: thb $ $Date: 2001-12-06 14:18:04 $ +# last change: $Author: hr $ $Date: 2003-03-25 18:28:18 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -100,7 +100,6 @@ SHL1BASE=0x1c000000 .INCLUDE : target.mk -# THB: exports list goodies checked for 6.0 Final 6.12.2001 .IF "$(GUI)"=="WNT" $(MISC)$/$(SHL1TARGET).def: makefile.mk diff --git a/goodies/source/graphic/grfmgr.cxx b/goodies/source/graphic/grfmgr.cxx index 2f8dedb23702..82bd365abe78 100644 --- a/goodies/source/graphic/grfmgr.cxx +++ b/goodies/source/graphic/grfmgr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: grfmgr.cxx,v $ * - * $Revision: 1.22 $ + * $Revision: 1.23 $ * - * last change: $Author: thb $ $Date: 2002-10-31 09:01:24 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,6 +61,8 @@ #define ENABLE_BYTESTRING_STREAM_OPERATORS +#include <algorithm> + #include <tools/vcompat.hxx> #include <unotools/ucbstreamhelper.hxx> #include <unotools/localfilehelper.hxx> @@ -728,108 +730,19 @@ BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, // ----------------------------------------------------------------------------- BOOL GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize, - const Size& rOffset, const GraphicAttr* pAttr, ULONG nFlags ) + const Size& rOffset, const GraphicAttr* pAttr, ULONG nFlags, int nTileCacheSize1D ) { - enum { MaxTileCacheSize1D=10 }; - if( pOut == NULL || rSize.Width() == 0 || rSize.Height() == 0 ) return FALSE; const MapMode aOutMapMode( pOut->GetMapMode() ); const MapMode aMapMode( aOutMapMode.GetMapUnit(), Point(), aOutMapMode.GetScaleX(), aOutMapMode.GetScaleY() ); - const Size aOutTileSize( pOut->LogicToPixel( rSize, aOutMapMode ) ); - BOOL bRet( FALSE ); - - if( GetGraphic().GetType() == GRAPHIC_BITMAP && - aOutTileSize.Width() * aOutTileSize.Height() < MaxTileCacheSize1D*MaxTileCacheSize1D ) - { - // First combine very small bitmaps into a larger tile - // =================================================== - - VirtualDevice aVDev; - const int nNumTilesInCacheX( (MaxTileCacheSize1D + aOutTileSize.Width()-1) / aOutTileSize.Width() ); - const int nNumTilesInCacheY( (MaxTileCacheSize1D + aOutTileSize.Height()-1) / aOutTileSize.Height() ); - - aVDev.SetOutputSizePixel( Size( nNumTilesInCacheX*aOutTileSize.Width(), nNumTilesInCacheY*aOutTileSize.Height() ) ); - aVDev.SetMapMode( aMapMode ); - - // draw bitmap content - if( ImplDrawTiled( aVDev, Point(0,0), nNumTilesInCacheX, nNumTilesInCacheY, aOutTileSize, pAttr, nFlags ) ) - { - BitmapEx aTileBitmap( aVDev.GetBitmap( Point(0,0), aVDev.GetOutputSize() ) ); - - // draw alpha content, if any - if( IsTransparent() ) - { - GraphicObject aAlphaGraphic; - - if( GetGraphic().IsAlpha() ) - aAlphaGraphic.SetGraphic( GetGraphic().GetBitmapEx().GetAlpha().GetBitmap() ); - else - aAlphaGraphic.SetGraphic( GetGraphic().GetBitmapEx().GetMask() ); - - if( aAlphaGraphic.ImplDrawTiled( aVDev, Point(0,0), nNumTilesInCacheX, nNumTilesInCacheY, aOutTileSize, pAttr, nFlags ) ) - { - // Combine bitmap and alpha/mask - if( GetGraphic().IsAlpha() ) - aTileBitmap = BitmapEx( aTileBitmap.GetBitmap(), - AlphaMask( aVDev.GetBitmap( Point(0,0), aVDev.GetOutputSize() ) ) ); - else - aTileBitmap = BitmapEx( aTileBitmap.GetBitmap(), - aVDev.GetBitmap( Point(0,0), aVDev.GetOutputSize() ).CreateMask( Color(COL_WHITE) ) ); - } - } - - // paint generated tile - GraphicObject aTmpGraphic( aTileBitmap ); - bRet = aTmpGraphic.DrawTiled( pOut, rArea, - Size( rSize.Width()*nNumTilesInCacheX, - rSize.Height()*nNumTilesInCacheY ), - rOffset, pAttr, nFlags ); - } - } - else - { - const Size aOutOffset( pOut->LogicToPixel( rOffset, aOutMapMode ) ); - const Rectangle aOutArea( pOut->LogicToPixel( rArea, aOutMapMode ) ); - - // number of invisible (because out-of-area) tiles - int nInvisibleTilesX; - int nInvisibleTilesY; + // #106258# Clamp size to 1 for zero values. This is okay, since + // logical size of zero is handled above already + const Size aOutTileSize( ::std::max( 1L, pOut->LogicToPixel( rSize, aOutMapMode ).Width() ), + ::std::max( 1L, pOut->LogicToPixel( rSize, aOutMapMode ).Height() ) ); - // round towards -infty for negative offset - if( aOutOffset.Width() < 0 ) - nInvisibleTilesX = (aOutOffset.Width() - aOutTileSize.Width() + 1) / aOutTileSize.Width(); - else - nInvisibleTilesX = aOutOffset.Width() / aOutTileSize.Width(); - - // round towards -infty for negative offset - if( aOutOffset.Height() < 0 ) - nInvisibleTilesY = (aOutOffset.Height() - aOutTileSize.Height() + 1) / aOutTileSize.Height(); - else - nInvisibleTilesY = aOutOffset.Height() / aOutTileSize.Height(); - - // origin from where to 'virtually' start drawing in pixel - const Point aOutOrigin( pOut->LogicToPixel( Point( rArea.Left() - rOffset.Width(), - rArea.Top() - rOffset.Height() ) ) ); - // position in pixel from where to really start output - const Point aOutStart( aOutOrigin.X() + nInvisibleTilesX*aOutTileSize.Width(), - aOutOrigin.Y() + nInvisibleTilesY*aOutTileSize.Height() ); - - pOut->Push( PUSH_CLIPREGION ); - pOut->IntersectClipRegion( rArea ); - - // Paint all tiles - // =============== - bRet = ImplDrawTiled( *pOut, aOutStart, - (aOutArea.GetWidth() + aOutArea.Left() - aOutStart.X() + aOutTileSize.Width() - 1) / aOutTileSize.Width(), - (aOutArea.GetHeight() + aOutArea.Top() - aOutStart.Y() + aOutTileSize.Height() - 1) / aOutTileSize.Height(), - aOutTileSize, pAttr, nFlags ); - - pOut->Pop(); - } - - return bRet; + return ImplDrawTiled( pOut, rArea, aOutTileSize, rOffset, pAttr, nFlags, nTileCacheSize1D ); } // ----------------------------------------------------------------------------- @@ -938,7 +851,191 @@ void GraphicObject::SetGraphic( const Graphic& rGraphic, const String& rLink ) // ----------------------------------------------------------------------------- -Graphic GraphicObject::GetTransformedGraphic( const GraphicAttr* pAttr ) const +Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMode& rDestMap, const GraphicAttr& rAttr ) const +{ + // #104550# Extracted from svx/source/svdraw/svdograf.cxx + Graphic aTransGraphic( maGraphic ); + const GraphicType eType = GetType(); + const Size aSrcSize( aTransGraphic.GetPrefSize() ); + + // #104115# Convert the crop margins to graphic object mapmode + const MapMode aMapGraph( aTransGraphic.GetPrefMapMode() ); + const MapMode aMap100( MAP_100TH_MM ); + + Size aCropLeftTop; + Size aCropRightBottom; + + if( GRAPHIC_GDIMETAFILE == eType ) + { + GDIMetaFile aMtf( aTransGraphic.GetGDIMetaFile() ); + + if( aMapGraph == MAP_PIXEL ) + { + aCropLeftTop = Application::GetDefaultDevice()->LogicToPixel( Size( rAttr.GetLeftCrop(), + rAttr.GetTopCrop() ), + aMap100 ); + aCropRightBottom = Application::GetDefaultDevice()->LogicToPixel( Size( rAttr.GetRightCrop(), + rAttr.GetBottomCrop() ), + aMap100 ); + } + else + { + aCropLeftTop = OutputDevice::LogicToLogic( Size( rAttr.GetLeftCrop(), + rAttr.GetTopCrop() ), + aMap100, + aMapGraph ); + aCropRightBottom = OutputDevice::LogicToLogic( Size( rAttr.GetRightCrop(), + rAttr.GetBottomCrop() ), + aMap100, + aMapGraph ); + } + + // #104115# If the metafile is cropped, give it a special + // treatment: clip against the remaining area, scale up such + // that this area later fills the desired size, and move the + // origin to the upper left edge of that area. + if( rAttr.IsCropped() ) + { + const MapMode aMtfMapMode( aMtf.GetPrefMapMode() ); + + Rectangle aClipRect( aMtfMapMode.GetOrigin().X() + aCropLeftTop.Width(), + aMtfMapMode.GetOrigin().Y() + aCropLeftTop.Height(), + aMtfMapMode.GetOrigin().X() + aSrcSize.Width() - aCropRightBottom.Width(), + aMtfMapMode.GetOrigin().Y() + aSrcSize.Height() - aCropRightBottom.Height() ); + + // #104115# To correctly crop rotated metafiles, clip by view rectangle + aMtf.AddAction( new MetaISectRectClipRegionAction( aClipRect ), 0 ); + + // #104115# To crop the metafile, scale larger than the output rectangle + aMtf.Scale( (double)rDestSize.Width() / (aSrcSize.Width() - aCropLeftTop.Width() - aCropRightBottom.Width()), + (double)rDestSize.Height() / (aSrcSize.Height() - aCropLeftTop.Height() - aCropRightBottom.Height()) ); + + // #104115# Adapt the pref size by hand (scale changes it + // proportionally, but we want it to be smaller than the + // former size, to crop the excess out) + aMtf.SetPrefSize( Size( (long)((double)rDestSize.Width() * (1.0 + (aCropLeftTop.Width() + aCropRightBottom.Width()) / aSrcSize.Width()) + .5), + (long)((double)rDestSize.Height() * (1.0 + (aCropLeftTop.Height() + aCropRightBottom.Height()) / aSrcSize.Height()) + .5) ) ); + + // #104115# Adapt the origin of the new mapmode, such that it + // is shifted to the place where the cropped output starts + Point aNewOrigin( (long)((double)aMtfMapMode.GetOrigin().X() + rDestSize.Width() * aCropLeftTop.Width() / (aSrcSize.Width() - aCropLeftTop.Width() - aCropRightBottom.Width()) + .5), + (long)((double)aMtfMapMode.GetOrigin().Y() + rDestSize.Height() * aCropLeftTop.Height() / (aSrcSize.Height() - aCropLeftTop.Height() - aCropRightBottom.Height()) + .5) ); + MapMode aNewMap( rDestMap ); + aNewMap.SetOrigin( OutputDevice::LogicToLogic(aNewOrigin, aMtfMapMode, rDestMap) ); + aMtf.SetPrefMapMode( aNewMap ); + } + else + { + aMtf.Scale( Fraction( rDestSize.Width(), aSrcSize.Width() ), Fraction( rDestSize.Height(), aSrcSize.Height() ) ); + aMtf.SetPrefMapMode( rDestMap ); + } + + aTransGraphic = aMtf; + } + else if( GRAPHIC_BITMAP == eType ) + { + BitmapEx aBmpEx( aTransGraphic.GetBitmapEx() ); + + // convert crops to pixel + aCropLeftTop = Application::GetDefaultDevice()->LogicToPixel( Size( rAttr.GetLeftCrop(), + rAttr.GetTopCrop() ), + aMap100 ); + aCropRightBottom = Application::GetDefaultDevice()->LogicToPixel( Size( rAttr.GetRightCrop(), + rAttr.GetBottomCrop() ), + aMap100 ); + + // #104115# Crop the bitmap + if( rAttr.IsCropped() ) + { + Size aSrcSize( aTransGraphic.GetPrefSize() ); + + // setup crop rectangle in prefmapmode system + Rectangle aCropRect( aCropLeftTop.Width(), aCropLeftTop.Height(), + aSrcSize.Width() - aCropRightBottom.Width(), + aSrcSize.Height() - aCropRightBottom.Height() ); + + // convert from prefmapmode to pixel + aCropRect = Application::GetDefaultDevice()->LogicToPixel( aCropRect, + aMapGraph ); + + aBmpEx.Crop( aCropRect ); + + // #104115# Negative crop sizes mean: enlarge bitmap and pad + if( aCropLeftTop.Width() < 0 || + aCropLeftTop.Height() < 0 || + aCropRightBottom.Width() < 0 || + aCropRightBottom.Height() < 0 ) + { + Size aBmpSize( aBmpEx.GetSizePixel() ); + sal_Int32 nPadLeft( aCropLeftTop.Width() < 0 ? -aCropLeftTop.Width() : 0 ); + sal_Int32 nPadTop( aCropLeftTop.Height() < 0 ? -aCropLeftTop.Height() : 0 ); + sal_Int32 nPadTotalWidth( aBmpSize.Width() + nPadLeft + (aCropRightBottom.Width() < 0 ? -aCropRightBottom.Width() : 0) ); + sal_Int32 nPadTotalHeight( aBmpSize.Height() + nPadTop + (aCropRightBottom.Height() < 0 ? -aCropRightBottom.Height() : 0) ); + + BitmapEx aBmpEx2; + + if( aBmpEx.IsTransparent() ) + { + if( aBmpEx.IsAlpha() ) + aBmpEx2 = BitmapEx( aBmpEx.GetBitmap(), aBmpEx.GetAlpha() ); + else + aBmpEx2 = BitmapEx( aBmpEx.GetBitmap(), aBmpEx.GetMask() ); + } + else + { + // #104115# Generate mask bitmap and init to zero + Bitmap aMask( aBmpSize, 1 ); + aMask.Erase( Color(0,0,0) ); + + // #104115# Always generate transparent bitmap, we need the border transparent + aBmpEx2 = BitmapEx( aBmpEx.GetBitmap(), aMask ); + + // #104115# Add opaque mask to source bitmap, otherwise the destination remains transparent + aBmpEx = aBmpEx2; + } + + aBmpEx2.SetSizePixel( Size(nPadTotalWidth, nPadTotalHeight) ); + aBmpEx2.Erase( Color(0xFF,0,0,0) ); + aBmpEx2.CopyPixel( Rectangle( Point(nPadLeft, nPadTop), aBmpSize ), Rectangle( Point(0, 0), aBmpSize ), &aBmpEx ); + aBmpEx = aBmpEx2; + } + } + + const Size aSizePixel( aBmpEx.GetSizePixel() ); + + if( rAttr.GetRotation() != 0 && !IsAnimated() ) + { + if( aSizePixel.Width() && aSizePixel.Height() && rDestSize.Width() && rDestSize.Height() ) + { + double fSrcWH = (double) aSizePixel.Width() / aSizePixel.Height(); + double fDstWH = (double) rDestSize.Width() / rDestSize.Height(); + double fScaleX = 1.0, fScaleY = 1.0; + + // always choose scaling to shrink bitmap + if( fSrcWH < fDstWH ) + fScaleY = aSizePixel.Width() / ( fDstWH * aSizePixel.Height() ); + else + fScaleX = fDstWH * aSizePixel.Height() / aSizePixel.Width(); + + aBmpEx.Scale( fScaleX, fScaleY ); + } + } + + aTransGraphic = aBmpEx; + + aTransGraphic.SetPrefSize( rDestSize ); + aTransGraphic.SetPrefMapMode( rDestMap ); + } + + GraphicObject aGrfObj( aTransGraphic ); + aTransGraphic = aGrfObj.GetTransformedGraphic( &rAttr ); + + return aTransGraphic; +} + +// ----------------------------------------------------------------------------- + +Graphic GraphicObject::GetTransformedGraphic( const GraphicAttr* pAttr ) const // TODO: Change to Impl { GetGraphic(); diff --git a/goodies/source/graphic/grfmgr2.cxx b/goodies/source/graphic/grfmgr2.cxx index 7ebe3dea353b..464cb0bcb548 100644 --- a/goodies/source/graphic/grfmgr2.cxx +++ b/goodies/source/graphic/grfmgr2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: grfmgr2.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: thb $ $Date: 2002-10-25 15:15:35 $ + * last change: $Author: hr $ $Date: 2003-03-25 18:28:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,8 +65,11 @@ #include <vcl/outdev.hxx> #include <vcl/window.hxx> #include <vcl/gdimtf.hxx> +#include <vcl/metaact.hxx> +#include <vcl/metric.hxx> #include <vcl/animate.hxx> #include <vcl/alpha.hxx> +#include <vcl/virdev.hxx> #include "grfcache.hxx" #include "grfmgr.hxx" @@ -194,8 +197,11 @@ BOOL GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size& // create output and fill cache const Size aOutSize( pOut->GetOutputSizePixel() ); - if( !( nFlags & GRFMGR_DRAW_CACHED ) || rObj.IsAnimated() || ( pOut->GetOutDevType() == OUTDEV_PRINTER ) || - ( pOut->GetConnectMetaFile() && !pOut->IsOutputEnabled() ) ) + if( rObj.IsAnimated() || ( pOut->GetOutDevType() == OUTDEV_PRINTER ) || + ( !( nFlags & GRFMGR_DRAW_NO_SUBSTITUTE ) && + ( ( nFlags & GRFMGR_DRAW_SUBSTITUTE ) || + !( nFlags & GRFMGR_DRAW_CACHED ) || + ( pOut->GetConnectMetaFile() && !pOut->IsOutputEnabled() ) ) ) ) { // simple output of transformed graphic const Graphic aGraphic( rObj.GetTransformedGraphic( &rAttr ) ); @@ -508,14 +514,23 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut, } else { - if( bSimple ) - bRet = ( aOutBmpEx = aBmpEx ).Scale( Size( nEndX - nStartX + 1, nEndY - nStartY + 1 ) ); + // #105229# Don't scale if output size equals bitmap size + if( aOutSzPix == rBmpSzPix ) + { + aOutBmpEx = aBmpEx; + bRet = TRUE; + } else { - bRet = ImplCreateScaled( aBmpEx, - pMapIX, pMapFX, pMapIY, pMapFY, - nStartX, nEndX, nStartY, nEndY, - aOutBmpEx ); + if( bSimple ) + bRet = ( aOutBmpEx = aBmpEx ).Scale( Size( nEndX - nStartX + 1, nEndY - nStartY + 1 ) ); + else + { + bRet = ImplCreateScaled( aBmpEx, + pMapIX, pMapFX, pMapIY, pMapFY, + nStartX, nEndX, nStartY, nEndY, + aOutBmpEx ); + } } } @@ -577,7 +592,50 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut, const double fGrfWH = (double) aNewSize.Width() / aNewSize.Height(); const double fOutWH = (double) rSz.Width() / rSz.Height(); - pMtf->Scale( fOutWH / fGrfWH, 1.0 ); + double fScaleX = fOutWH / fGrfWH; + double fScaleY = 1.0; + + // taking care of font width default if scaling metafile: + sal_uInt32 nCurPos; + MetaAction* pAct; + for( nCurPos = 0, pAct = (MetaAction*)pMtf->FirstAction(); pAct; + pAct = (MetaAction*)pMtf->NextAction(), nCurPos++ ) + { + MetaAction* pModAct = NULL; + switch( pAct->GetType() ) + { + case META_FONT_ACTION : + { + MetaFontAction* pA = (MetaFontAction*)pAct; + Font aFont( pA->GetFont() ); + if ( !aFont.GetWidth() ) + { + FontMetric aFontMetric( pOut->GetFontMetric( aFont ) ); + aFont.SetWidth( aFontMetric.GetWidth() ); + pModAct = new MetaFontAction( aFont ); + } + } + } + if ( pModAct ) + { + pMtf->ReplaceAction( pModAct, nCurPos ); + pAct->Delete(); + } + else + { + if( pAct->GetRefCount() > 1 ) + { + pMtf->ReplaceAction( pModAct = pAct->Clone(), nCurPos ); + pAct->Delete(); + } + else + pModAct = pAct; + } + pModAct->Scale( fScaleX, fScaleY ); + } + pMtf->SetPrefSize( Size( FRound( aNewSize.Width() * fScaleX ), + FRound( aNewSize.Height() * fScaleY ) ) ); + /* if( fGrfWH < fWinWH ) aNewSize.Width() = (long) ( ( aNewSize.Height() = rSz.Height.Height() ) * fGrfWH ); @@ -1547,7 +1605,363 @@ void GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, const Size& // ----------------------------------------------------------------------------- -BOOL GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel, +struct ImplTileInfo +{ + ImplTileInfo() : aTileTopLeft(), aNextTileTopLeft(), aTileSizePixel(), nTilesEmptyX(0), nTilesEmptyY(0) {} + + Point aTileTopLeft; // top, left position of the rendered tile + Point aNextTileTopLeft; // top, left position for next recursion + // level's tile + Size aTileSizePixel; // size of the generated tile (might + // differ from + // aNextTileTopLeft-aTileTopLeft, because + // this is nExponent*prevTileSize. The + // generated tile is always nExponent + // times the previous tile, such that it + // can be used in the next stage. The + // required area coverage is often + // less. The extraneous area covered is + // later overwritten by the next stage) + int nTilesEmptyX; // number of original tiles empty right of + // this tile. This counts from + // aNextTileTopLeft, i.e. the additional + // area covered by aTileSizePixel is not + // considered here. This is for + // unification purposes, as the iterative + // calculation of the next level's empty + // tiles has to be based on this value. + int nTilesEmptyY; // as above, for Y +}; + + +bool GraphicObject::ImplRenderTempTile( VirtualDevice& rVDev, int nExponent, + int nNumTilesX, int nNumTilesY, + const Size& rTileSizePixel, + const GraphicAttr* pAttr, ULONG nFlags ) +{ + if( nExponent <= 1 ) + return false; + + // determine MSB factor + int nMSBFactor( 1 ); + while( nNumTilesX / nMSBFactor != 0 || + nNumTilesY / nMSBFactor != 0 ) + { + nMSBFactor *= nExponent; + } + + // one less + nMSBFactor /= nExponent; + + ImplTileInfo aTileInfo; + + // #105229# Switch off mapping (converting to logic and back to + // pixel might cause roundoff errors) + BOOL bOldMap( rVDev.IsMapModeEnabled() ); + rVDev.EnableMapMode( FALSE ); + + bool bRet( ImplRenderTileRecursive( rVDev, nExponent, nMSBFactor, nNumTilesX, nNumTilesY, + nNumTilesX, nNumTilesY, rTileSizePixel, pAttr, nFlags, aTileInfo ) ); + + rVDev.EnableMapMode( bOldMap ); + + return bRet; +} + +// ----------------------------------------------------------------------------- + +// define for debug drawings +//#define DBG_TEST + +// see header comment. this works similar to base conversion of a +// number, i.e. if the exponent is 10, then the number for every tile +// size is given by the decimal place of the corresponding decimal +// representation. +bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent, int nMSBFactor, + int nNumOrigTilesX, int nNumOrigTilesY, + int nRemainderTilesX, int nRemainderTilesY, + const Size& rTileSizePixel, const GraphicAttr* pAttr, + ULONG nFlags, ImplTileInfo& rTileInfo ) +{ + // gets loaded with our tile bitmap + GraphicObject aTmpGraphic; + + // stores a flag that renders the zero'th tile position + // (i.e. (0,0)+rCurrPos) only if we're at the bottom of the + // recursion stack. All other position already have that tile + // rendered, because the lower levels painted their generated tile + // there. + bool bNoFirstTileDraw( false ); + + // what's left when we're done with our tile size + const int nNewRemainderX( nRemainderTilesX % nMSBFactor ); + const int nNewRemainderY( nRemainderTilesY % nMSBFactor ); + + // gets filled out from the recursive call with info of what's + // been generated + ImplTileInfo aTileInfo; + + // current output position while drawing + Point aCurrPos; + int nX, nY; + + // check for recursion's end condition: LSB place reached? + if( nMSBFactor == 1 ) + { + aTmpGraphic = *this; + + // set initial tile size -> orig size + aTileInfo.aTileSizePixel = rTileSizePixel; + aTileInfo.nTilesEmptyX = nNumOrigTilesX; + aTileInfo.nTilesEmptyY = nNumOrigTilesY; + } + else if( ImplRenderTileRecursive( rVDev, nExponent, nMSBFactor/nExponent, + nNumOrigTilesX, nNumOrigTilesY, + nNewRemainderX, nNewRemainderY, + rTileSizePixel, pAttr, nFlags, aTileInfo ) ) + { + // extract generated tile -> see comment on the first loop below + BitmapEx aTileBitmap( rVDev.GetBitmap( aTileInfo.aTileTopLeft, aTileInfo.aTileSizePixel ) ); + + aTmpGraphic = GraphicObject( aTileBitmap ); + + // fill stripes left over from upstream levels: + // + // x0000 + // 0 + // 0 + // 0 + // 0 + // + // where x denotes the place filled by our recursive predecessors + + // check whether we have to fill stripes here. Although not + // obvious, there is one case where we can skip this step: if + // the previous recursion level (the one who filled our + // aTileInfo) had zero area to fill, then there are no white + // stripes left, naturally. This happens if the digit + // associated to that level has a zero, and can be checked via + // aTileTopLeft==aNextTileTopLeft. + if( aTileInfo.aTileTopLeft != aTileInfo.aNextTileTopLeft ) + { + // now fill one row from aTileInfo.aNextTileTopLeft.X() all + // the way to the right + aCurrPos.X() = aTileInfo.aNextTileTopLeft.X(); + aCurrPos.Y() = aTileInfo.aTileTopLeft.Y(); + for( nX=0; nX < aTileInfo.nTilesEmptyX; nX += nMSBFactor ) + { + if( !aTmpGraphic.Draw( &rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr, nFlags ) ) + return false; + + aCurrPos.X() += aTileInfo.aTileSizePixel.Width(); + } + +#ifdef DBG_TEST +// rVDev.SetFillColor( COL_WHITE ); + rVDev.SetFillColor(); + rVDev.SetLineColor( Color( 255 * nExponent / nMSBFactor, 255 - 255 * nExponent / nMSBFactor, 128 - 255 * nExponent / nMSBFactor ) ); + rVDev.DrawEllipse( Rectangle(aTileInfo.aNextTileTopLeft.X(), aTileInfo.aTileTopLeft.Y(), + aTileInfo.aNextTileTopLeft.X() - 1 + (aTileInfo.nTilesEmptyX/nMSBFactor)*aTileInfo.aTileSizePixel.Width(), + aTileInfo.aTileTopLeft.Y() + aTileInfo.aTileSizePixel.Height() - 1) ); +#endif + + // now fill one column from aTileInfo.aNextTileTopLeft.Y() all + // the way to the bottom + aCurrPos.X() = aTileInfo.aTileTopLeft.X(); + aCurrPos.Y() = aTileInfo.aNextTileTopLeft.Y(); + for( nY=0; nY < aTileInfo.nTilesEmptyY; nY += nMSBFactor ) + { + if( !aTmpGraphic.Draw( &rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr, nFlags ) ) + return false; + + aCurrPos.Y() += aTileInfo.aTileSizePixel.Height(); + } + +#ifdef DBG_TEST + rVDev.DrawEllipse( Rectangle(aTileInfo.aTileTopLeft.X(), aTileInfo.aNextTileTopLeft.Y(), + aTileInfo.aTileTopLeft.X() + aTileInfo.aTileSizePixel.Width() - 1, + aTileInfo.aNextTileTopLeft.Y() - 1 + (aTileInfo.nTilesEmptyY/nMSBFactor)*aTileInfo.aTileSizePixel.Height()) ); +#endif + } + else + { + // Thought that aTileInfo.aNextTileTopLeft tile has always + // been drawn already, but that's wrong: typically, + // _parts_ of that tile have been drawn, since the + // previous level generated the tile there. But when + // aTileInfo.aNextTileTopLeft!=aTileInfo.aTileTopLeft, the + // difference between these two values is missing in the + // lower right corner of this first tile. So, can do that + // only here. + bNoFirstTileDraw = true; + } + } + else + { + return false; + } + + // calc number of original tiles in our drawing area without + // remainder + nRemainderTilesX -= nNewRemainderX; + nRemainderTilesY -= nNewRemainderY; + + // fill tile info for calling method + rTileInfo.aTileTopLeft = aTileInfo.aNextTileTopLeft; + rTileInfo.aNextTileTopLeft = Point( rTileInfo.aTileTopLeft.X() + rTileSizePixel.Width()*nRemainderTilesX, + rTileInfo.aTileTopLeft.Y() + rTileSizePixel.Height()*nRemainderTilesY ); + rTileInfo.aTileSizePixel = Size( rTileSizePixel.Width()*nMSBFactor*nExponent, + rTileSizePixel.Height()*nMSBFactor*nExponent ); + rTileInfo.nTilesEmptyX = aTileInfo.nTilesEmptyX - nRemainderTilesX; + rTileInfo.nTilesEmptyY = aTileInfo.nTilesEmptyY - nRemainderTilesY; + + // init output position + aCurrPos = aTileInfo.aNextTileTopLeft; + + // fill our drawing area. Fill possibly more, to create the next + // bigger tile size -> see bitmap extraction above. This does no + // harm, since everything right or below our actual area is + // overdrawn by our caller. Just in case we're in the last level, + // we don't draw beyond the right or bottom border. + for( nY=0; nY < aTileInfo.nTilesEmptyY && nY < nExponent*nMSBFactor; nY += nMSBFactor ) + { + aCurrPos.X() = aTileInfo.aNextTileTopLeft.X(); + + for( nX=0; nX < aTileInfo.nTilesEmptyX && nX < nExponent*nMSBFactor; nX += nMSBFactor ) + { + if( bNoFirstTileDraw ) + bNoFirstTileDraw = false; // don't draw first tile position + else if( !aTmpGraphic.Draw( &rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr, nFlags ) ) + return false; + + aCurrPos.X() += aTileInfo.aTileSizePixel.Width(); + } + + aCurrPos.Y() += aTileInfo.aTileSizePixel.Height(); + } + +#ifdef DBG_TEST +// rVDev.SetFillColor( COL_WHITE ); + rVDev.SetFillColor(); + rVDev.SetLineColor( Color( 255 * nExponent / nMSBFactor, 255 - 255 * nExponent / nMSBFactor, 128 - 255 * nExponent / nMSBFactor ) ); + rVDev.DrawRect( Rectangle((rTileInfo.aTileTopLeft.X())*rTileSizePixel.Width(), + (rTileInfo.aTileTopLeft.Y())*rTileSizePixel.Height(), + (rTileInfo.aNextTileTopLeft.X())*rTileSizePixel.Width()-1, + (rTileInfo.aNextTileTopLeft.Y())*rTileSizePixel.Height()-1) ); +#endif + + return true; +} + +// ----------------------------------------------------------------------------- + +bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSizePixel, + const Size& rOffset, const GraphicAttr* pAttr, ULONG nFlags, int nTileCacheSize1D ) +{ + // how many tiles to generate per recursion step + enum{ SubdivisionExponent=2 }; + + const MapMode aOutMapMode( pOut->GetMapMode() ); + const MapMode aMapMode( aOutMapMode.GetMapUnit(), Point(), aOutMapMode.GetScaleX(), aOutMapMode.GetScaleY() ); + bool bRet( false ); + + if( GetGraphic().GetType() == GRAPHIC_BITMAP && + rSizePixel.Width() * rSizePixel.Height() < nTileCacheSize1D*nTileCacheSize1D ) + { + // First combine very small bitmaps into a larger tile + // =================================================== + + VirtualDevice aVDev; + const int nNumTilesInCacheX( (nTileCacheSize1D + rSizePixel.Width()-1) / rSizePixel.Width() ); + const int nNumTilesInCacheY( (nTileCacheSize1D + rSizePixel.Height()-1) / rSizePixel.Height() ); + + aVDev.SetOutputSizePixel( Size( nNumTilesInCacheX*rSizePixel.Width(), nNumTilesInCacheY*rSizePixel.Height() ) ); + aVDev.SetMapMode( aMapMode ); + + // draw bitmap content + if( ImplRenderTempTile( aVDev, SubdivisionExponent, nNumTilesInCacheX, + nNumTilesInCacheY, rSizePixel, pAttr, nFlags ) ) + { + BitmapEx aTileBitmap( aVDev.GetBitmap( Point(0,0), aVDev.GetOutputSize() ) ); + + // draw alpha content, if any + if( IsTransparent() ) + { + GraphicObject aAlphaGraphic; + + if( GetGraphic().IsAlpha() ) + aAlphaGraphic.SetGraphic( GetGraphic().GetBitmapEx().GetAlpha().GetBitmap() ); + else + aAlphaGraphic.SetGraphic( GetGraphic().GetBitmapEx().GetMask() ); + + if( aAlphaGraphic.ImplRenderTempTile( aVDev, SubdivisionExponent, nNumTilesInCacheX, + nNumTilesInCacheY, rSizePixel, pAttr, nFlags ) ) + { + // Combine bitmap and alpha/mask + if( GetGraphic().IsAlpha() ) + aTileBitmap = BitmapEx( aTileBitmap.GetBitmap(), + AlphaMask( aVDev.GetBitmap( Point(0,0), aVDev.GetOutputSize() ) ) ); + else + aTileBitmap = BitmapEx( aTileBitmap.GetBitmap(), + aVDev.GetBitmap( Point(0,0), aVDev.GetOutputSize() ).CreateMask( Color(COL_WHITE) ) ); + } + } + + // paint generated tile + GraphicObject aTmpGraphic( aTileBitmap ); + bRet = aTmpGraphic.ImplDrawTiled( pOut, rArea, + aTileBitmap.GetSizePixel(), + rOffset, pAttr, nFlags, nTileCacheSize1D ); + } + } + else + { + const Size aOutOffset( pOut->LogicToPixel( rOffset, aOutMapMode ) ); + const Rectangle aOutArea( pOut->LogicToPixel( rArea, aOutMapMode ) ); + + // number of invisible (because out-of-area) tiles + int nInvisibleTilesX; + int nInvisibleTilesY; + + // round towards -infty for negative offset + if( aOutOffset.Width() < 0 ) + nInvisibleTilesX = (aOutOffset.Width() - rSizePixel.Width() + 1) / rSizePixel.Width(); + else + nInvisibleTilesX = aOutOffset.Width() / rSizePixel.Width(); + + // round towards -infty for negative offset + if( aOutOffset.Height() < 0 ) + nInvisibleTilesY = (aOutOffset.Height() - rSizePixel.Height() + 1) / rSizePixel.Height(); + else + nInvisibleTilesY = aOutOffset.Height() / rSizePixel.Height(); + + // origin from where to 'virtually' start drawing in pixel + const Point aOutOrigin( pOut->LogicToPixel( Point( rArea.Left() - rOffset.Width(), + rArea.Top() - rOffset.Height() ) ) ); + // position in pixel from where to really start output + const Point aOutStart( aOutOrigin.X() + nInvisibleTilesX*rSizePixel.Width(), + aOutOrigin.Y() + nInvisibleTilesY*rSizePixel.Height() ); + + pOut->Push( PUSH_CLIPREGION ); + pOut->IntersectClipRegion( rArea ); + + // Paint all tiles + // =============== + + bRet = ImplDrawTiled( *pOut, aOutStart, + (aOutArea.GetWidth() + aOutArea.Left() - aOutStart.X() + rSizePixel.Width() - 1) / rSizePixel.Width(), + (aOutArea.GetHeight() + aOutArea.Top() - aOutStart.Y() + rSizePixel.Height() - 1) / rSizePixel.Height(), + rSizePixel, pAttr, nFlags ); + + pOut->Pop(); + } + + return bRet; +} + +// ----------------------------------------------------------------------------- + +bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel, int nNumTilesX, int nNumTilesY, const Size& rTileSizePixel, const GraphicAttr* pAttr, ULONG nFlags ) { @@ -1555,14 +1969,32 @@ BOOL GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel, Size aTileSizeLogic( rOut.PixelToLogic( rTileSizePixel ) ); int nX, nY; + // #107607# Use logical coordinates for metafile playing, too + bool bDrawInPixel( rOut.GetConnectMetaFile() == NULL && GRAPHIC_BITMAP == GetType() ); + + // #105229# Switch off mapping (converting to logic and back to + // pixel might cause roundoff errors) + BOOL bOldMap( rOut.IsMapModeEnabled() ); + + if( bDrawInPixel ) + rOut.EnableMapMode( FALSE ); + for( nY=0; nY < nNumTilesY; ++nY ) { aCurrPos.X() = rPosPixel.X(); for( nX=0; nX < nNumTilesX; ++nX ) { - if( !Draw( &rOut, rOut.PixelToLogic( aCurrPos ), aTileSizeLogic, pAttr, nFlags ) ) + // #105229# work with pixel coordinates here, mapping is disabled! + // #104004# don't disable mapping for metafile recordings + if( !Draw( &rOut, + bDrawInPixel ? aCurrPos : rOut.PixelToLogic( aCurrPos ), + bDrawInPixel ? rTileSizePixel : aTileSizeLogic, + pAttr, nFlags ) ) + { + rOut.EnableMapMode( bOldMap ); return FALSE; + } aCurrPos.X() += rTileSizePixel.Width(); } @@ -1570,5 +2002,8 @@ BOOL GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel, aCurrPos.Y() += rTileSizePixel.Height(); } + if( bDrawInPixel ) + rOut.EnableMapMode( bOldMap ); + return TRUE; } |