1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 #ifndef INCLUDED_VCL_INC_OPENGL_LINERENDERUTILS_H
12 #define INCLUDED_VCL_INC_OPENGL_LINERENDERUTILS_H
14 #include <opengl/RenderList.hxx>
21 std::vector
<Vertex
>& mrVertices
;
22 std::vector
<GLuint
>& mrIndices
;
23 GLubyte mR
, mG
, mB
, mA
;
24 GLfloat
const mfLineWidth
;
25 GLfloat
const mfLineWidthAndAA
;
26 size_t const mnInitialIndexSize
;
30 LineBuilder(std::vector
<Vertex
>& rVertices
, std::vector
<GLuint
>& rIndices
,
31 Color nColor
, GLfloat fTransparency
,
32 GLfloat fLineWidth
, bool bUseAA
);
34 void appendLineSegment(const glm::vec2
& rPoint1
, const glm::vec2
& rNormal1
, GLfloat aExtrusion1
,
35 const glm::vec2
& rPoint2
, const glm::vec2
& rNormal2
, GLfloat aExtrusion2
);
37 void appendLine(const glm::vec2
& rPoint1
, const glm::vec2
& rPoint2
);
39 void appendAndConnectLinePoint(const glm::vec2
& rPoint
, const glm::vec2
& aNormal
, GLfloat aExtrusion
);
41 void appendMiterJoint(glm::vec2
const& point
, const glm::vec2
& prevLineVector
,
42 glm::vec2
const& nextLineVector
);
43 void appendBevelJoint(glm::vec2
const& point
, const glm::vec2
& prevLineVector
,
44 const glm::vec2
& nextLineVector
);
45 void appendRoundJoint(glm::vec2
const& point
, const glm::vec2
& prevLineVector
,
46 const glm::vec2
& nextLineVector
);
47 void appendRoundLineCapVertices(const glm::vec2
& rPoint1
, const glm::vec2
& rPoint2
);
48 void appendSquareLineCapVertices(const glm::vec2
& rPoint1
, const glm::vec2
& rPoint2
);
53 #endif // INCLUDED_VCL_INC_OPENGL_LINERENDERUTILS_H
55 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */