[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    Bug#31348: marked as done (Bug in clipart rendering (and patch for correction)) by David Faure <davi
From:       owner () bugs ! kde ! org (Stephan Kulow)
Date:       2001-08-23 13:18:02
[Download RAW message or body]

Your message with subj: KDE bugs information: logs for bug#31348

> Package:kword
> Version:cvs 22/08 (using KDE 2.2.0)
> Severity:normal
> Installed from: compiled sources
> distribution, OS, Compiler:  Suse7.1, linux 2.4.0, gcc 2.95.2
> 
> Hi,
> 
> Change done by the patch
> 1 add of createPalette, createFontIndirect and createRegion
>   to keep in sync the counting of objects
> 2 createBrushIndirect no more change the Pen
> 3 when style of pen is >6 (PS_INSIDEFRAME, PS_USERSTYLE, PS_ALTERNATE) the
> width is set to 1
> 4 better positionning of ellipse
> 5 better moveto and lineto position

Cool!
Applied, thanks.

> to apply the patch in koffice/lib : patch -p1 -d kwmf <patch-wmf
Or 
cd koffice/lib/kwmf ; patch < patch-wmf
:)

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today


has caused the attached bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I'm
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Stephan Kulow
(administrator, KDE bugs database)

Received: (at submit) by bugs.kde.org; 22 Aug 2001 20:46:16 +0000
Received: (qmail 2851 invoked from network); 22 Aug 2001 20:46:16 -0000
Received: from mail.libertysurf.net (213.36.80.91)
  by max.tat.physik.uni-tuebingen.de with SMTP; 22 Aug 2001 20:46:16 -0000
Received: from there (213.36.128.37) by mail.libertysurf.net (5.1.053)
        id 3B80AD08000639C6 for submit@bugs.kde.org; Wed, 22 Aug 2001 22:45:19 +0200
Message-ID: <3B80AD08000639C6@mail.libertysurf.net> (added by postmaster@libertysurf.fr)
From: thierry lorthiois <lor.thi@libertysurf.fr>
Reply-To: lor.thi@libertysurf.fr
To: submit@bugs.kde.org
Subject: Bug in clipart rendering (and patch for correction)
Date: Wed, 22 Aug 2001 22:44:03 +0200
X-Mailer: KMail [version 1.3]
MIME-Version: 1.0
Content-Type: Multipart/Mixed;
  boundary="------------Boundary-00=_FLLH2NBOWVO2FHDMEA7K"
X-Spam-Rating: max.tat.physik.uni-tuebingen.de 600/1000/N



Package:kword
Version:cvs 22/08 (using KDE 2.2.0)
Severity:normal
Installed from: compiled sources
distribution, OS, Compiler:  Suse7.1, linux 2.4.0, gcc 2.95.2

Hi,

Change done by the patch 
1 add of createPalette, createFontIndirect and createRegion
  to keep in sync the counting of objects
2 createBrushIndirect no more change the Pen
3 when style of pen is >6 (PS_INSIDEFRAME, PS_USERSTYLE, PS_ALTERNATE) the 
width is set to 1
4 better positionning of ellipse
5 better moveto and lineto position

to apply the patch in koffice/lib : patch -p1 -d kwmf <patch-wmf

you can see the result of the patch on the file voilier.wmf 

bye

thierry lorthiois

["patch-wmf" (text/x-diff)]

diff -uNp kwmf/metafuncs.h new/metafuncs.h
--- kwmf/metafuncs.h	Mon May 17 14:42:28 1999
+++ new/metafuncs.h	Wed Aug 22 17:45:08 2001
@@ -75,12 +75,12 @@ struct MetaFuncRec
       { "STRETCHDIB",           0x0f43, 0 },
       { "EXTFLOODFILL",         0x0548, 0 },
       { "DELETEOBJECT",         0x01f0, &QWinMetaFile::deleteObject },
-      { "CREATEPALETTE",        0x00f7, 0 },
+      { "CREATEPALETTE",        0x00f7, &QWinMetaFile::createPalette },
       { "CREATEPATTERNBRUSH",   0x01F9, 0 },
       { "CREATEPENINDIRECT",    0x02FA, &QWinMetaFile::createPenIndirect },
-      { "CREATEFONTINDIRECT",   0x02FB, 0 },
+      { "CREATEFONTINDIRECT",   0x02FB, &QWinMetaFile::createFontIndirect },
       { "CREATEBRUSHINDIRECT",  0x02FC, &QWinMetaFile::createBrushIndirect },
-      { "CREATEREGION",         0x06FF, 0 },
+      { "CREATEREGION",         0x06FF, &QWinMetaFile::createRegion },
       { NULL,                   0,      0 }
   };
 
diff -uNp kwmf/qwmf.cc new/qwmf.cc
--- kwmf/qwmf.cc	Wed Aug  1 00:08:07 2001
+++ new/qwmf.cc	Wed Aug 22 21:39:59 2001
@@ -74,11 +74,7 @@ public:
 
 void WinObjBrushHandle::apply( QPainter& p )
 {
-    QPen pen;
-    pen.setColor( brush.color() );
-
     p.setBrush( brush );
-    p.setPen( pen );
 }
 
 void WinObjPenHandle::apply( QPainter& p )
@@ -90,7 +86,6 @@ void WinObjPenHandle::apply( QPainter& p
 
 
 
-
 //-----------------------------------------------------------------------------
 QWinMetaFile::QWinMetaFile(): mPainter(), mPoints()
 {
@@ -493,14 +488,14 @@ void QWinMetaFile::setWindowExt( short, 
 //-----------------------------------------------------------------------------
 void QWinMetaFile::lineTo( short, short* parm )
 {
-    mPainter.lineTo( parm[ 0 ], parm[ 1 ] );
+    mPainter.lineTo( parm[ 1 ], parm[ 0 ] );
 }
 
 
 //-----------------------------------------------------------------------------
 void QWinMetaFile::moveTo( short, short* parm )
 {
-    mPainter.moveTo( parm[ 0 ], parm[ 1 ] );
+    mPainter.moveTo( parm[ 1 ], parm[ 0 ] );
 }
 
 
@@ -523,7 +518,7 @@ void QWinMetaFile::deleteObject( short, 
 //-----------------------------------------------------------------------------
 void QWinMetaFile::ellipse( short, short* parm )
 {
-    mPainter.drawEllipse( parm[ 0 ], parm[ 1 ], parm[ 2 ]-parm[ 0 ], parm[ 3 ]-parm[ 1 ] );
+    mPainter.drawEllipse( parm[ 3 ], parm[ 2 ], parm[ 1 ]-parm[ 3 ], parm[ 0 ]-parm[ 2 ] );
 }
 
 
@@ -601,6 +596,36 @@ void QWinMetaFile::setRop( short, short*
 
 
 //-----------------------------------------------------------------------------
+void QWinMetaFile::createPalette( short, short* parm )
+{
+    // allocation of an empty object (to keep object counting in sync)
+    WinObjPenHandle* handle = new WinObjPenHandle;
+    int idx = handleIndex();
+    if ( idx >= 0 ) mObjHandleTab[ idx ] = handle;
+}
+
+
+//-----------------------------------------------------------------------------
+void QWinMetaFile::createFontIndirect( short, short* parm )
+{
+    // allocation of an empty object (to keep object counting in sync)
+    WinObjPenHandle* handle = new WinObjPenHandle;
+    int idx = handleIndex();
+    if ( idx >= 0 ) mObjHandleTab[ idx ] = handle;
+}
+
+
+//-----------------------------------------------------------------------------
+void QWinMetaFile::createRegion( short, short* parm )
+{
+    // allocation of an empty object (to keep object counting in sync)
+    WinObjPenHandle* handle = new WinObjPenHandle;
+    int idx = handleIndex();
+    if ( idx >= 0 ) mObjHandleTab[ idx ] = handle;
+}
+
+
+//-----------------------------------------------------------------------------
 void QWinMetaFile::createBrushIndirect( short, short* parm )
 {
     static Qt::BrushStyle hatchedStyleTab[] =
@@ -663,6 +688,7 @@ void QWinMetaFile::createPenIndirect( sh
     {
         kdDebug() << "QWinMetaFile::createPenIndirect: invalid pen " << parm[ 0 ] << endl;
         style = Qt::SolidLine;
+        parm[ 1 ] = 1;
     }
     // if ( parm[ 1 ]<=0 ) style=NoPen;
 
diff -uNp kwmf/qwmf.h new/qwmf.h
--- kwmf/qwmf.h	Sat Jul 14 20:37:23 2001
+++ new/qwmf.h	Wed Aug 22 21:08:31 2001
@@ -74,6 +74,12 @@ public: // should be protected but canno
     void polyline( short num, short* parms );
     // set polygon fill mode
     void setPolyFillMode( short num, short* parms );
+    // create palette
+    void createPalette( short num, short* parms );
+    // create a logical font
+    void createFontIndirect( short num, short* parms );
+    // create region
+    void createRegion( short num, short* parms );
     // create a logical brush
     void createBrushIndirect( short num, short* parms );
     // create a logical pen

["voilier.wmf" (application/octet-stream)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic