Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
f54212fb
Kaydet (Commit)
f54212fb
authored
May 11, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
refactor SvResizeWindow to use RenderContext
Change-Id: I3c986ff077a6183b6067c5a16a226954fa84b44c
üst
795a9b32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
37 deletions
+52
-37
ipwin.cxx
svtools/source/hatchwindow/ipwin.cxx
+17
-17
ipwin.hxx
svtools/source/hatchwindow/ipwin.hxx
+35
-20
No files found.
svtools/source/hatchwindow/ipwin.cxx
Dosyayı görüntüle @
f54212fb
...
@@ -106,31 +106,31 @@ void SvResizeHelper::FillMoveRectsPixel( Rectangle aRects[ 4 ] ) const
...
@@ -106,31 +106,31 @@ void SvResizeHelper::FillMoveRectsPixel( Rectangle aRects[ 4 ] ) const
|*
|*
|* Description
|* Description
*************************************************************************/
*************************************************************************/
void
SvResizeHelper
::
Draw
(
OutputDevice
*
pDev
)
void
SvResizeHelper
::
Draw
(
vcl
::
RenderContext
&
rRenderContext
)
{
{
pDev
->
Push
();
rRenderContext
.
Push
();
pDev
->
SetMapMode
(
MapMode
()
);
rRenderContext
.
SetMapMode
(
MapMode
()
);
Color
aColBlack
;
Color
aColBlack
;
Color
aFillColor
(
COL_LIGHTGRAY
);
Color
aFillColor
(
COL_LIGHTGRAY
);
pDev
->
SetFillColor
(
aFillColor
);
rRenderContext
.
SetFillColor
(
aFillColor
);
pDev
->
SetLineColor
();
rRenderContext
.
SetLineColor
();
Rectangle
aMoveRects
[
4
];
Rectangle
aMoveRects
[
4
];
FillMoveRectsPixel
(
aMoveRects
);
FillMoveRectsPixel
(
aMoveRects
);
sal_uInt16
i
;
sal_uInt16
i
;
for
(
i
=
0
;
i
<
4
;
i
++
)
for
(
i
=
0
;
i
<
4
;
i
++
)
pDev
->
DrawRect
(
aMoveRects
[
i
]
);
rRenderContext
.
DrawRect
(
aMoveRects
[
i
]
);
if
(
bResizeable
)
if
(
bResizeable
)
{
{
// draw handles
// draw handles
pDev
->
SetFillColor
(
aColBlack
);
rRenderContext
.
SetFillColor
(
aColBlack
);
Rectangle
aRects
[
8
];
Rectangle
aRects
[
8
];
FillHandleRectsPixel
(
aRects
);
FillHandleRectsPixel
(
aRects
);
for
(
i
=
0
;
i
<
8
;
i
++
)
for
(
i
=
0
;
i
<
8
;
i
++
)
pDev
->
DrawRect
(
aRects
[
i
]
);
rRenderContext
.
DrawRect
(
aRects
[
i
]
);
}
}
pDev
->
Pop
();
rRenderContext
.
Pop
();
}
}
/*************************************************************************
/*************************************************************************
...
@@ -612,9 +612,9 @@ void SvResizeWindow::Resize()
...
@@ -612,9 +612,9 @@ void SvResizeWindow::Resize()
|*
|*
|* Description
|* Description
*************************************************************************/
*************************************************************************/
void
SvResizeWindow
::
Paint
(
vcl
::
RenderContext
&
/*rRenderContext*/
,
const
Rectangle
&
/*rRect*/
)
void
SvResizeWindow
::
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
/*rRect*/
)
{
{
m_aResizer
.
Draw
(
this
);
m_aResizer
.
Draw
(
rRenderContext
);
}
}
bool
SvResizeWindow
::
PreNotify
(
NotifyEvent
&
rEvt
)
bool
SvResizeWindow
::
PreNotify
(
NotifyEvent
&
rEvt
)
...
...
svtools/source/hatchwindow/ipwin.hxx
Dosyayı görüntüle @
f54212fb
...
@@ -33,31 +33,46 @@ class SvResizeHelper
...
@@ -33,31 +33,46 @@ class SvResizeHelper
Point
aSelPos
;
Point
aSelPos
;
bool
bResizeable
;
bool
bResizeable
;
public
:
public
:
SvResizeHelper
();
SvResizeHelper
();
void
SetResizeable
(
bool
b
)
{
bResizeable
=
b
;
}
void
SetResizeable
(
bool
b
)
short
GetGrab
()
const
{
return
nGrab
;
}
{
void
SetBorderPixel
(
const
Size
&
rBorderP
)
bResizeable
=
b
;
{
aBorder
=
rBorderP
;
}
}
const
Size
&
GetBorderPixel
()
const
{
return
aBorder
;
}
short
GetGrab
()
const
const
Rectangle
&
GetOuterRectPixel
()
const
{
{
return
aOuter
;
}
return
nGrab
;
void
SetOuterRectPixel
(
const
Rectangle
&
rRect
)
}
{
aOuter
=
rRect
;
}
void
SetBorderPixel
(
const
Size
&
rBorderP
)
Rectangle
GetInnerRectPixel
()
const
{
{
aBorder
=
rBorderP
;
Rectangle
aRect
(
aOuter
);
}
aRect
.
Top
()
+=
aBorder
.
Height
();
const
Size
&
GetBorderPixel
()
const
aRect
.
Left
()
+=
aBorder
.
Width
();
{
aRect
.
Bottom
()
-=
aBorder
.
Height
();
return
aBorder
;
aRect
.
Right
()
-=
aBorder
.
Width
();
}
return
aRect
;
const
Rectangle
&
GetOuterRectPixel
()
const
}
{
return
aOuter
;
}
void
SetOuterRectPixel
(
const
Rectangle
&
rRect
)
{
aOuter
=
rRect
;
}
Rectangle
GetInnerRectPixel
()
const
{
Rectangle
aRect
(
aOuter
);
aRect
.
Top
()
+=
aBorder
.
Height
();
aRect
.
Left
()
+=
aBorder
.
Width
();
aRect
.
Bottom
()
-=
aBorder
.
Height
();
aRect
.
Right
()
-=
aBorder
.
Width
();
return
aRect
;
}
// Clockwise, start at upper left
// Clockwise, start at upper left
void
FillHandleRectsPixel
(
Rectangle
aRects
[
8
]
)
const
;
void
FillHandleRectsPixel
(
Rectangle
aRects
[
8
]
)
const
;
void
FillMoveRectsPixel
(
Rectangle
aRects
[
4
]
)
const
;
void
FillMoveRectsPixel
(
Rectangle
aRects
[
4
]
)
const
;
void
Draw
(
OutputDevice
*
);
void
Draw
(
vcl
::
RenderContext
&
rRenderContext
);
void
InvalidateBorder
(
vcl
::
Window
*
);
void
InvalidateBorder
(
vcl
::
Window
*
);
bool
SelectBegin
(
vcl
::
Window
*
,
const
Point
&
rPos
);
bool
SelectBegin
(
vcl
::
Window
*
,
const
Point
&
rPos
);
short
SelectMove
(
vcl
::
Window
*
pWin
,
const
Point
&
rPos
);
short
SelectMove
(
vcl
::
Window
*
pWin
,
const
Point
&
rPos
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment