--===============1889048501== Content-Type: multipart/alternative; boundary="===============3255956939767033833==" --===============3255956939767033833== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable > On March 13, 2011, 1:29 p.m., Thomas L=C3=BCbking wrote: > > kwin/outline.cpp, line 133 > > > > > > since it's just a vertical reflection, you could just keep the abov= e pixmap in context and > > = > > for (int i =3D 0; i<4; ++i) > > p.drawPixmap(0,i, topPix, 0,3-i, topPix.width(), 1); > > = > > you can also keep the painter and p.begin(&pix) instead of QPainter= p(&pix) - it's only buggy in Qt if you change the renderengine (ie. use it= on an image and then on a pixmap) fixing myself: 2+2=3D5... for (int i =3D 0; i<5; ++i) p.drawPixmap(0,i, topPix, 0,4-i, topPix.width(), 1); if you want to spare allocating the "large" pixmap twice in a block you cou= ld also just mirror the corners in one 5x5 tmp pixmap - Thomas ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/100848/#review1930 ----------------------------------------------------------- On March 13, 2011, 12:37 p.m., Arthur Arlt wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/100848/ > ----------------------------------------------------------- > = > (Updated March 13, 2011, 12:37 p.m.) > = > = > Review request for kwin. > = > = > Summary > ------- > = > This patch refactors the code for outlining geometries to an own class Ou= tline. It is used by tabbox and quick tiling. There were two similar implem= entations for both functionalities which are now refactored to a new class = Outline. This class provides the X implementation for showing and hiding an= outline of a given geometry. > For the future this functionality could be replaced by an effect. > = > = > Diffs > ----- > = > kwin/CMakeLists.txt 976c831 = > kwin/geometry.cpp 88719bf = > kwin/outline.h PRE-CREATION = > kwin/outline.cpp PRE-CREATION = > kwin/tabbox.h 1f02b1f = > kwin/tabbox.cpp e2d07fe = > kwin/tabbox/tabboxhandler.h 96a1fc6 = > kwin/tabbox/tabboxhandler.cpp b178efe = > kwin/workspace.h fe97c77 = > kwin/workspace.cpp 43e3e8c = > = > Diff: http://git.reviewboard.kde.org/r/100848/diff > = > = > Testing > ------- > = > Quick Tiling and tabbox works with this implementation. > = > = > Thanks, > = > Arthur > = > --===============3255956939767033833== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable
This is an automatically generated e-mail. To reply, visit: http://git.revie= wboard.kde.org/r/100848/

On March 13th, 2011, 1:29 p.m., Thomas L=C3= =BCbking wrote:

= = =
kwin/outline.cpp (Diff revision 1)
void Outline::showXOutline()
133
        QPixmap pix(m_outlin=
eGeometry.width(), 5);
since it&=
#39;s just a vertical reflection, you could just keep the above pixmap in c=
ontext and

for (int i =3D 0; i<4; ++i)
   p.drawPixmap(0,i, topPix, 0,3-i, topPix.width(), 1);

you can also keep the painter and p.begin(&pix) instead of QPainter p(&=
amp;pix) - it's only buggy in Qt if you change the renderengine (ie. us=
e it on an image and then on a pixmap)
fixing myself: 2+2=3D5...
for (int i =3D 0; i<5; ++i)
   p.drawPixmap(0,i, topPix, 0,4-i, topPix.width(), 1);

if you want to spare allocating the "large" pixmap twice in a blo=
ck you could also just mirror the corners in one 5x5 tmp pixmap

- Thomas


On March 13th, 2011, 12:37 p.m., Arthur Arlt wrote:

Review request for kwin.
By Arthur Arlt.

Updated March 13, 2011, 12:37 p.m.

Descripti= on

This patch refactors the code for outlining geometries to an=
 own class Outline. It is used by tabbox and quick tiling. There were two s=
imilar implementations for both functionalities which are now refactored to=
 a new class Outline. This class provides the X implementation for showing =
and hiding an outline of a given geometry.
For the future this functionality could be replaced by an effect.

Testing <= /h1>
Quick Tiling and tabbox works with this implementation.

Diffs=

  • kwin/CMakeLists.txt (976c831)
  • kwin/geometry.cpp (88719bf)
  • kwin/outline.h (PRE-CREATION)
  • kwin/outline.cpp (PRE-CREATION)
  • kwin/tabbox.h (1f02b1f)
  • kwin/tabbox.cpp (e2d07fe)
  • kwin/tabbox/tabboxhandler.h (96a1fc6)
  • kwin/tabbox/tabboxhandler.cpp (b178efe)
  • kwin/workspace.h (fe97c77)
  • kwin/workspace.cpp (43e3e8c)

View Diff

--===============3255956939767033833==-- --===============1889048501== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kwin mailing list kwin@kde.org https://mail.kde.org/mailman/listinfo/kwin --===============1889048501==--