예제 #1
0
 public void setProgramVector(string name, bloPoint vector)
 {
     if (mProgram == null)
     {
         return;
     }
     GL.Uniform2(getUniformLocation(name), vector.x, vector.y);
 }
예제 #2
0
        public void printReturn(ushort[] buffer, int width, int height, bloTextboxHBinding hbind, bloTextboxVBinding vbind, int x, int y, int alpha)
        {
            if (mFont == null)
            {
                return;
            }
            initchar();
            mOrigin = new bloPoint((int)mCursor.X, (int)mCursor.Y);
            int[]    lines = new int[cMaxLines + 1];
            Vector2d size;
            double   totalHeight = (parse(buffer, width, lines, out size, alpha, false) + mState.fontHeight);

            switch (vbind)
            {
            case bloTextboxVBinding.Top: break;

            case bloTextboxVBinding.Bottom: y += (bloMath.round(totalHeight) - height); break;

            case bloTextboxVBinding.Center: y += ((bloMath.round(totalHeight) - height) / 2); break;
            }
            int i = 0;

            while (lines[i] != -1)
            {
                switch (hbind)
                {
                case bloTextboxHBinding.Left: {
                    lines[i] = 0;
                    break;
                }

                case bloTextboxHBinding.Right: {
                    lines[i] = (width - lines[i]);
                    break;
                }

                case bloTextboxHBinding.Center: {
                    lines[i] = ((width - lines[i]) / 2);
                    break;
                }
                }
                ++i;
            }
            initchar();
            mCursor += new Vector2d(x, (y + mState.fontHeight));
            mOrigin  = new bloPoint((int)mCursor.X, (int)mCursor.Y);
            parse(buffer, width, lines, out size, alpha, true);
        }
예제 #3
0
 public void move(bloPoint point)
 {
     move(point.x, point.y);
 }
예제 #4
0
 public void add(bloPoint point)
 {
     add(point.x, point.y);
 }
예제 #5
0
 public void draw(bloPoint point)
 {
     draw(point.x, point.y);
 }
예제 #6
0
 public void locate(int x, int y)
 {
     mOrigin      = new bloPoint(x, y);
     mCursor      = new Vector2d(x, y);
     mCursorWidth = 0.0d;
 }