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/.
12 in vec4 fragmentColor;
17 vec2 p = gl_PointCoord * 2.0 - vec2(1.0); // (0,0) in the center
21 else if(shape == 1) //diamon
23 if (abs(p.x) + abs(p.y) > 1)
26 else if(shape == 2) // arrow
28 if(p.y < 0 && (abs(p.x) + abs(p.y)) > 1)
30 else if(p.y > 0 && abs(p.x) > 0.5)
33 else if(shape == 3) //arrow up
35 if(p.y > 0 && (abs(p.x) + abs(p.y)) > 1)
37 else if(p.y < 0 && abs(p.x) > 0.5)
40 else if(shape == 4) // arrow right
42 if(p.x > 0 && (abs(p.x) + abs(p.y)) > 1)
44 else if(p.x < 0 && abs(p.y) > 0.5)
47 else if(shape == 5) // arrow left
49 if(p.x < 0 && (abs(p.x) + abs(p.y)) > 1)
51 else if(p.x > 0 && abs(p.y) > 0.5)
54 else if(shape == 6) // hour glass
56 if(abs(p.x) < abs(p.y))
59 else if(shape == 7) // bow tie
61 if(abs(p.y) < abs(p.x))
64 else if(shape == 8) // circle
69 else if(shape == 9) // star
71 if(sqrt(abs(p.x))+sqrt(abs(p.y)) > 1)
74 else if(shape == 10) // X
76 if(abs(abs(p.x) - abs(p.y)) > 0.2)
79 else if(shape == 11) // Plus
81 if(abs(p.x) > 0.2 && abs(p.y) > 0.2)
84 else if(shape == 12) // asterisk
87 else if(shape == 13) // horizontal bar
92 else if(shape == 14) // vertical bar
98 gl_FragColor = fragmentColor;
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */