Exemple #1
0
    public static void Draw_HISTOGRAM_RADIAL(float[] _values, float _x, float _y, float _radius_start, float _radius_end, Color _col_MIN, Color _col_MAX, bool _alphaFade = false, float _angle_start = 0, float _angle_end = 1, float _rotation = 1)
    {
        GL.PushMatrix();
        GL_DRAW.TransformMatrix(_x, _y, _rotation);
        int   _TOTAL_BINS   = _values.Length;
        float _RANGE_RADIUS = _radius_end - _radius_start;
        float _RANGE_ANGLE  = (_angle_end - _angle_start) * GL_DRAW.PI2;
        float _DIV_ANGLE    = _RANGE_ANGLE / _TOTAL_BINS;

        for (int i = 0; i < _TOTAL_BINS; i++)
        {
            float   _CURRENT_ANGLE = _angle_start + (i * _DIV_ANGLE);
            float   _BIN_VALUE     = _values[i];
            Vector2 _POS_START     = GL_DRAW.PolarCoord(_CURRENT_ANGLE, _radius_start);
            Vector2 _POS_END       = GL_DRAW.PolarCoord(_CURRENT_ANGLE, _radius_start + (_RANGE_RADIUS * _BIN_VALUE));
            Color   _COL           = Color.Lerp(_col_MIN, _col_MAX, _BIN_VALUE);
            GL_DRAW.Draw_LINE(_POS_START.x, GL_DRAW.LockAspect_Y(_POS_START.y), _POS_END.x, GL_DRAW.LockAspect_Y(_POS_END.y), (_alphaFade) ? COL.Set_alphaStrength(_COL, _BIN_VALUE) : _COL);
        }
        GL.PopMatrix();
    }
Exemple #2
0
 public static void Draw_MATRIX_ANIM_FRAME(List <BitArray> _frames, int _frame, int _cellsX, int _cellsY, int _totalFrames, float _x, float _y, float _w, Color _col, float _rotation = 0)
 {
     GL_DRAW.Draw_MATRIX_RECT(_x, _y, _w, GL_DRAW.LockAspect_Y(_w), _cellsX, _cellsY, _col, _frames[_frame % _totalFrames], _rotation);
 }
Exemple #3
0
    public static void Draw_Glyph(char _char, float _x, float _y, float _size, Color _col, float _rotation = 1)
    {
        BitArray _CELLS = GL_FONT_3x5.Get(_char);

        GL_DRAW.Draw_MATRIX_RECT(_x, _y, _size * 3, -GL_DRAW.LockAspect_Y(_size * 5), 3, 5, _col, _CELLS, _rotation);
    }