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
1b3dcdbe
Kaydet (Commit)
1b3dcdbe
authored
Kas 12, 2014
tarafından
Louis-Francis Ratté-Boulianne
Kaydeden (comit)
Markus Mohrhard
Kas 13, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl: Fix several coordinates calculations
Change-Id: I15878b4d91081a7ac880713ad278893aaad4a844
üst
afd759a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
gdiimpl.cxx
vcl/opengl/gdiimpl.cxx
+9
-9
No files found.
vcl/opengl/gdiimpl.cxx
Dosyayı görüntüle @
1b3dcdbe
...
@@ -447,7 +447,7 @@ void OpenGLSalGraphicsImpl::DrawPoint( long nX, long nY )
...
@@ -447,7 +447,7 @@ void OpenGLSalGraphicsImpl::DrawPoint( long nX, long nY )
GLfloat
pPoint
[
2
];
GLfloat
pPoint
[
2
];
pPoint
[
0
]
=
2
*
nX
/
GetWidth
()
-
1.0
f
;
pPoint
[
0
]
=
2
*
nX
/
GetWidth
()
-
1.0
f
;
pPoint
[
1
]
=
2
*
(
GetHeight
()
-
nY
)
/
GetHeight
()
-
1.0
f
;
pPoint
[
1
]
=
1.0
f
-
2
*
nY
/
GetHeight
()
;
glEnableVertexAttribArray
(
GL_ATTRIB_POS
);
glEnableVertexAttribArray
(
GL_ATTRIB_POS
);
glVertexAttribPointer
(
GL_ATTRIB_POS
,
2
,
GL_FLOAT
,
GL_FALSE
,
0
,
pPoint
);
glVertexAttribPointer
(
GL_ATTRIB_POS
,
2
,
GL_FLOAT
,
GL_FALSE
,
0
,
pPoint
);
...
@@ -462,9 +462,9 @@ void OpenGLSalGraphicsImpl::DrawLine( long nX1, long nY1, long nX2, long nY2 )
...
@@ -462,9 +462,9 @@ void OpenGLSalGraphicsImpl::DrawLine( long nX1, long nY1, long nX2, long nY2 )
GLfloat
pPoints
[
4
];
GLfloat
pPoints
[
4
];
pPoints
[
0
]
=
(
2
*
nX1
)
/
GetWidth
()
-
1.0
;
pPoints
[
0
]
=
(
2
*
nX1
)
/
GetWidth
()
-
1.0
;
pPoints
[
1
]
=
(
2
*
(
GetHeight
()
-
nY1
))
/
GetHeight
()
-
1.0
;
pPoints
[
1
]
=
1.0
f
-
2
*
nY1
/
GetHeight
()
;
pPoints
[
2
]
=
(
2
*
nX2
)
/
GetWidth
()
-
1.0
;;
pPoints
[
2
]
=
(
2
*
nX2
)
/
GetWidth
()
-
1.0
;;
pPoints
[
3
]
=
(
2
*
(
GetHeight
()
-
nY2
))
/
GetHeight
()
-
1.0
;
pPoints
[
3
]
=
1.0
f
-
2
*
nY2
/
GetHeight
()
;
glEnableVertexAttribArray
(
GL_ATTRIB_POS
);
glEnableVertexAttribArray
(
GL_ATTRIB_POS
);
glVertexAttribPointer
(
GL_ATTRIB_POS
,
2
,
GL_FLOAT
,
GL_FALSE
,
0
,
pPoints
);
glVertexAttribPointer
(
GL_ATTRIB_POS
,
2
,
GL_FLOAT
,
GL_FALSE
,
0
,
pPoints
);
...
@@ -504,7 +504,7 @@ void OpenGLSalGraphicsImpl::DrawConvexPolygon( sal_uInt32 nPoints, const SalPoin
...
@@ -504,7 +504,7 @@ void OpenGLSalGraphicsImpl::DrawConvexPolygon( sal_uInt32 nPoints, const SalPoin
for
(
i
=
0
,
j
=
0
;
i
<
nPoints
;
i
++
,
j
+=
2
)
for
(
i
=
0
,
j
=
0
;
i
<
nPoints
;
i
++
,
j
+=
2
)
{
{
aVertices
[
j
]
=
(
2
*
pPtAry
[
i
].
mnX
)
/
GetWidth
()
-
1.0
;
aVertices
[
j
]
=
(
2
*
pPtAry
[
i
].
mnX
)
/
GetWidth
()
-
1.0
;
aVertices
[
j
+
1
]
=
(
2
*
pPtAry
[
i
].
mnY
)
/
GetHeight
()
-
1.0
;
aVertices
[
j
+
1
]
=
1.0
-
(
2
*
pPtAry
[
i
].
mnY
/
GetHeight
())
;
}
}
glEnableVertexAttribArray
(
GL_ATTRIB_POS
);
glEnableVertexAttribArray
(
GL_ATTRIB_POS
);
...
@@ -525,7 +525,7 @@ void OpenGLSalGraphicsImpl::DrawConvexPolygon( const Polygon& rPolygon )
...
@@ -525,7 +525,7 @@ void OpenGLSalGraphicsImpl::DrawConvexPolygon( const Polygon& rPolygon )
{
{
const
Point
&
rPt
=
rPolygon
.
GetPoint
(
i
);
const
Point
&
rPt
=
rPolygon
.
GetPoint
(
i
);
aVertices
[
j
]
=
(
2
*
rPt
.
X
())
/
GetWidth
()
-
1.0
;
aVertices
[
j
]
=
(
2
*
rPt
.
X
())
/
GetWidth
()
-
1.0
;
aVertices
[
j
+
1
]
=
(
2
*
(
GetHeight
()
-
rPt
.
Y
()))
/
GetHeight
()
-
1.0
;
aVertices
[
j
+
1
]
=
1.0
-
(
2
*
rPt
.
Y
()
/
GetHeight
())
;
}
}
glEnableVertexAttribArray
(
GL_ATTRIB_POS
);
glEnableVertexAttribArray
(
GL_ATTRIB_POS
);
...
@@ -539,9 +539,9 @@ void OpenGLSalGraphicsImpl::DrawConvexPolygon( const Polygon& rPolygon )
...
@@ -539,9 +539,9 @@ void OpenGLSalGraphicsImpl::DrawConvexPolygon( const Polygon& rPolygon )
void
OpenGLSalGraphicsImpl
::
DrawRect
(
long
nX
,
long
nY
,
long
nWidth
,
long
nHeight
)
void
OpenGLSalGraphicsImpl
::
DrawRect
(
long
nX
,
long
nY
,
long
nWidth
,
long
nHeight
)
{
{
long
nX1
(
nX
);
long
nX1
(
nX
);
long
nY1
(
GetHeight
()
-
nY
);
long
nY1
(
nY
);
long
nX2
(
nX
+
nWidth
);
long
nX2
(
nX
+
nWidth
);
long
nY2
(
GetHeight
()
-
nY
-
nHeight
);
long
nY2
(
nY
+
nHeight
);
const
SalPoint
aPoints
[]
=
{
{
nX1
,
nY2
},
{
nX1
,
nY1
},
const
SalPoint
aPoints
[]
=
{
{
nX1
,
nY2
},
{
nX1
,
nY1
},
{
nX2
,
nY1
},
{
nX2
,
nY2
}};
{
nX2
,
nY1
},
{
nX2
,
nY2
}};
...
@@ -551,9 +551,9 @@ void OpenGLSalGraphicsImpl::DrawRect( long nX, long nY, long nWidth, long nHeigh
...
@@ -551,9 +551,9 @@ void OpenGLSalGraphicsImpl::DrawRect( long nX, long nY, long nWidth, long nHeigh
void
OpenGLSalGraphicsImpl
::
DrawRect
(
const
Rectangle
&
rRect
)
void
OpenGLSalGraphicsImpl
::
DrawRect
(
const
Rectangle
&
rRect
)
{
{
long
nX1
(
rRect
.
Left
()
);
long
nX1
(
rRect
.
Left
()
);
long
nY1
(
GetHeight
()
-
rRect
.
Top
()
);
long
nY1
(
rRect
.
Top
()
);
long
nX2
(
rRect
.
Right
()
);
long
nX2
(
rRect
.
Right
()
);
long
nY2
(
GetHeight
()
-
rRect
.
Bottom
()
);
long
nY2
(
rRect
.
Bottom
()
);
const
SalPoint
aPoints
[]
=
{
{
nX1
,
nY2
},
{
nX1
,
nY1
},
const
SalPoint
aPoints
[]
=
{
{
nX1
,
nY2
},
{
nX1
,
nY1
},
{
nX2
,
nY1
},
{
nX2
,
nY2
}};
{
nX2
,
nY1
},
{
nX2
,
nY2
}};
...
...
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