Example #1
0
 public SingleLineContext(Span <sGlyphVertex> destSpan, CPoint start, uint id)
 {
     glyphLayout = new GlyphLayout(start);
     this.id     = id;
     destIndex   = 0;
     span        = destSpan;
 }
Example #2
0
        public MeasureBlock(int breakWidth, int lineHeight)
        {
            glyphLayout     = new GlyphLayout(new CPoint());
            this.lineHeight = (ushort)lineHeight;
            lineBreaker     = new LineBreaker(breakWidth);
            maxY            = maxLineWidth = 0;

            firstCharacterInWord = int.MinValue;
        }
Example #3
0
        public ConsoleBlock(Span <sGlyphVertex> destSpan, CPoint start, ref sScaledMetrics metrics, uint id, int width)
        {
            glyphLayout       = new GlyphLayout(start);
            lineStartPosition = glyphLayout.currentPositionPixels;
            lineHeight        = (ushort)metrics.lineHeight;
            characterWidth    = (ushort)metrics.maxAdvancePixels;
            this.id           = id;

            this.destSpan         = destSpan;
            nextGlyphVertexOffset = 0;
            x          = 0;
            this.width = width;
        }
Example #4
0
        public LeftAlignedBlock(Span <sVertexWithId> destSpan, CRect rectangle, int lineHeight, uint id)
        {
            this.rectangle    = rectangle;
            glyphLayout       = new GlyphLayout(rectangle.topLeft);
            lineStartPosition = glyphLayout.currentPositionPixels;
            lineBreaker       = new LineBreaker(rectangle.right);
            this.lineHeight   = (ushort)lineHeight;
            this.id           = id;
            buffer            = LineBuffer.instance;
            buffer.clear();

            firstCharacterInWord = int.MinValue;

            finalDestSpan = destSpan;
            destOffset    = 0;
        }