Renderer: Fix java compilation
[scilab.git] / scilab / modules / renderer / src / java / org / scilab / modules / renderer / JoGLView / util / PixelDrawingModeUtils.java
1 /*
2  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  * Copyright (C) 2016 - Caio SOUZA
4  *
5  * Copyright (C) 2012 - 2016 - Scilab Enterprises
6  *
7  * This file is hereby licensed under the terms of the GNU GPL v2.0,
8  * pursuant to article 5.3.4 of the CeCILL v.2.1.
9  * This file was originally licensed under the terms of the CeCILL v2.1,
10  * and continues to be available under such terms.
11  * For more information, see the COPYING file which you should have received
12  * along with this program.
13  */
14 package org.scilab.modules.renderer.JoGLView.util;
15
16 import static org.scilab.modules.graphic_objects.figure.Figure.PixelDrawingMode;
17 import org.scilab.forge.scirenderer.implementation.jogl.JoGLPixelDrawingMode;
18
19 public class PixelDrawingModeUtils {
20
21     public static JoGLPixelDrawingMode figureToJoGLmode(PixelDrawingMode mode) {
22         switch (mode) {
23             case CLEAR:
24                 return JoGLPixelDrawingMode.CLEAR;
25             case AND:
26                 return JoGLPixelDrawingMode.AND;
27             case ANDREVERSE:
28                 return JoGLPixelDrawingMode.AND_REVERSE;
29             case COPY:
30                 return JoGLPixelDrawingMode.COPY;
31             case ANDINVERTED:
32                 return JoGLPixelDrawingMode.AND_INVERTED;
33             case NOOP:
34                 return JoGLPixelDrawingMode.NOOP;
35             case XOR:
36                 return JoGLPixelDrawingMode.XOR;
37             case OR:
38                 return JoGLPixelDrawingMode.OR;
39             case NOR:
40                 return JoGLPixelDrawingMode.NOR;
41             case EQUIV:
42                 return JoGLPixelDrawingMode.EQUIV;
43             case INVERT:
44                 return JoGLPixelDrawingMode.INVERT;
45             case ORREVERSE:
46                 return JoGLPixelDrawingMode.OR_REVERSE;
47             case COPYINVERTED:
48                 return JoGLPixelDrawingMode.COPY_INVERTED;
49             case ORINVERTED:
50                 return JoGLPixelDrawingMode.OR_INVERTED;
51             case NAND:
52                 return JoGLPixelDrawingMode.NAND;
53             case SET:
54                 return JoGLPixelDrawingMode.SET;
55             default:
56                 return  null;
57
58         }
59     }
60 }