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
b2f76e0e
Kaydet (Commit)
b2f76e0e
authored
Mar 05, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add DrawHandle to DecorationView
Change-Id: Ie063071cc57d756fd5da20a15533a6857940f676
üst
19dc7225
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
3 deletions
+48
-3
decoview.hxx
include/vcl/decoview.hxx
+2
-2
decoview.cxx
vcl/source/window/decoview.cxx
+46
-1
No files found.
include/vcl/decoview.hxx
Dosyayı görüntüle @
b2f76e0e
...
@@ -73,8 +73,7 @@ private:
...
@@ -73,8 +73,7 @@ private:
OutputDevice
*
mpOutDev
;
OutputDevice
*
mpOutDev
;
public
:
public
:
DecorationView
(
OutputDevice
*
pOutDev
)
DecorationView
(
OutputDevice
*
pOutDev
);
{
mpOutDev
=
pOutDev
;
}
void
DrawSymbol
(
const
Rectangle
&
rRect
,
SymbolType
eType
,
void
DrawSymbol
(
const
Rectangle
&
rRect
,
SymbolType
eType
,
const
Color
&
rColor
,
sal_uInt16
nStyle
=
0
);
const
Color
&
rColor
,
sal_uInt16
nStyle
=
0
);
...
@@ -86,6 +85,7 @@ public:
...
@@ -86,6 +85,7 @@ public:
Rectangle
DrawFrame
(
const
Rectangle
&
rRect
,
sal_uInt16
nStyle
=
FRAME_DRAW_OUT
);
Rectangle
DrawFrame
(
const
Rectangle
&
rRect
,
sal_uInt16
nStyle
=
FRAME_DRAW_OUT
);
Rectangle
DrawButton
(
const
Rectangle
&
rRect
,
sal_uInt16
nStyle
);
Rectangle
DrawButton
(
const
Rectangle
&
rRect
,
sal_uInt16
nStyle
);
void
DrawSeparator
(
const
Point
&
rStart
,
const
Point
&
rStop
,
bool
bVertical
=
true
);
void
DrawSeparator
(
const
Point
&
rStart
,
const
Point
&
rStop
,
bool
bVertical
=
true
);
void
DrawHandle
(
const
Rectangle
&
rRectangle
,
bool
bVertical
=
true
);
};
};
#endif // INCLUDED_VCL_DECOVIEW_HXX
#endif // INCLUDED_VCL_DECOVIEW_HXX
...
...
vcl/source/window/decoview.cxx
Dosyayı görüntüle @
b2f76e0e
...
@@ -822,7 +822,11 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
...
@@ -822,7 +822,11 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
}
}
}
}
}
}
// end anonymous namespace
DecorationView
::
DecorationView
(
OutputDevice
*
pOutDev
)
:
mpOutDev
(
pOutDev
)
{}
void
DecorationView
::
DrawSymbol
(
const
Rectangle
&
rRect
,
SymbolType
eType
,
void
DecorationView
::
DrawSymbol
(
const
Rectangle
&
rRect
,
SymbolType
eType
,
const
Color
&
rColor
,
sal_uInt16
nStyle
)
const
Color
&
rColor
,
sal_uInt16
nStyle
)
...
@@ -1081,4 +1085,45 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo
...
@@ -1081,4 +1085,45 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo
mpOutDev
->
Pop
();
mpOutDev
->
Pop
();
}
}
void
DecorationView
::
DrawHandle
(
const
Rectangle
&
rRect
,
bool
bVertical
)
{
const
StyleSettings
&
rStyleSettings
=
mpOutDev
->
GetSettings
().
GetStyleSettings
();
Size
aOutputSize
=
rRect
.
GetSize
();
mpOutDev
->
SetLineColor
(
rStyleSettings
.
GetDarkShadowColor
());
mpOutDev
->
SetFillColor
(
rStyleSettings
.
GetDarkShadowColor
());
sal_Int32
nNumberOfPoints
=
3
;
long
nHalfWidth
=
aOutputSize
.
Width
()
/
2.0
f
;
long
nHalfHeight
=
aOutputSize
.
Height
()
/
2.0
f
;
float
fDistance
=
bVertical
?
aOutputSize
.
Height
()
:
aOutputSize
.
Width
();
fDistance
/=
(
nNumberOfPoints
+
1
);
long
nRadius
=
bVertical
?
aOutputSize
.
Width
()
:
aOutputSize
.
Height
();
nRadius
/=
(
nNumberOfPoints
+
2
);
for
(
long
i
=
1
;
i
<=
nNumberOfPoints
;
i
++
)
{
Rectangle
aLocation
;
if
(
bVertical
)
{
aLocation
=
Rectangle
(
nHalfWidth
-
nRadius
,
std
::
round
(
fDistance
*
i
)
-
nRadius
,
nHalfWidth
+
nRadius
,
std
::
round
(
fDistance
*
i
)
+
nRadius
);
}
else
{
aLocation
=
Rectangle
(
std
::
round
(
fDistance
*
i
)
-
nRadius
,
nHalfHeight
-
nRadius
,
std
::
round
(
fDistance
*
i
)
+
nRadius
,
nHalfHeight
+
nRadius
);
}
mpOutDev
->
DrawEllipse
(
aLocation
);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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