Exemplo n.º 1
0
        public static int bmfGetBaseline(this L_Bmf bmf, char chr, out int pbaseline)
        {
            if (null == bmf)
            {
                throw new ArgumentNullException("bmf cannot be null.");
            }

            return(Native.DllImports.bmfGetBaseline((HandleRef)bmf, chr, out pbaseline));
        }
Exemplo n.º 2
0
        public static void bmfDestroy(this L_Bmf pbmf)
        {
            if (null == pbmf)
            {
                throw new ArgumentNullException("pbmf cannot be null.");
            }

            var pointer = (IntPtr)pbmf;

            Native.DllImports.bmfDestroy(ref pointer);
        }
Exemplo n.º 3
0
        public static Pix bmfGetPix(L_Bmf bmf, char chr)
        {
            if (null == bmf)
            {
                throw new ArgumentNullException("bmf cannot be null.");
            }

            var pointer = Native.DllImports.bmfGetPix((HandleRef)bmf, chr);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pix(pointer));
            }
        }
Exemplo n.º 4
0
 // Font layout
 public static Pix pixAddSingleTextblock(this Pix pixs, L_Bmf bmf, string textstr, uint val, int location, out int poverflow)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 5
0
 public static int bmfGetStringWidth(this L_Bmf bmf, string textstr, out int pw)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 6
0
 public static Numa bmfGetWordWidths(this L_Bmf bmf, string textstr, Sarray sa)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 7
0
 // Text size estimation and partitioning
 public static Sarray bmfGetLineStrings(L_Bmf bmf, string textstr, int maxw, int firstindent, out int ph)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 8
0
 public static int pixaAddPixWithText(this Pixa pixa, Pix pixs, int reduction, L_Bmf bmf, string textstr, uint val, int location)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 9
0
 public static Pixa pixaAddTextlines(this Pixa pixas, L_Bmf bmf, Sarray sa, uint val, int location)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 10
0
 public static Pixa pixaAddTextNumber(this Pixa pixas, L_Bmf bmf, Numa na, uint val, int location)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 11
0
 public static int pixSetTextline(this Pix pixs, L_Bmf bmf, string textstr, uint val, int x0, int y0, out int pwidth, out int poverflow)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 12
0
 public static int pixSetTextblock(this Pix pixs, L_Bmf bmf, string textstr, uint val, int x0, int y0, int wtext, int firstindent, out int poverflow)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 13
0
 public static Pix pixAddTextlines(this Pix pixs, L_Bmf bmf, string textstr, uint val, int location)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 14
0
        /// <summary>
        /// (1) Before calling this function for the first time, use
        ///     pixaCreate() to make the %pixa that will accumulate the pix.
        ///     This is passed in each time pixSaveTiled() is called.
        /// (2) %outwidth is the scaled width.  After scaling, the image is
        ///     saved in the input pixa, along with a box that specifies
        ///     the location to place it when tiled later.  Disable saving
        ///     the pix by setting %outwidth == 0.
        /// (3) %newrow and %space specify the location of the new pix
        ///     with respect to the last one(s) that were entered.
        /// (4) All pix are saved as 32 bpp RGB.
        /// (5) If both %bmf and %textstr are defined, this generates a pix
        ///     with the additional text; otherwise, no text is written.
        /// (6) The text is written before scaling, so it is properly
        ///     antialiased in the scaled pix.  However, if the pix on
        ///     different calls have different widths, the size of the
        ///     text will vary.
        /// (7) See pixSaveTiledOutline() for other implementation details.
        /// </summary>
        /// <param name="pixs">1, 2, 4, 8, 32 bpp</param>
        /// <param name="pixa">the pix are accumulated here; as 32 bpp</param>
        /// <param name="outwidth">in pixels; use 0 to disable entirely</param>
        /// <param name="newrow">true to start a new row; false to go on same row as previous</param>
        /// <param name="space">horizontal and vertical spacing, in pixels</param>
        /// <param name="linewidth">width of added outline for image; 0 for no outline</param>
        /// <param name="bmf">[optional] font struct</param>
        /// <param name="textstr">[optional] text string to be added</param>
        /// <param name="val">color to set the text</param>
        /// <param name="location">L_ADD_ABOVE, L_ADD_AT_TOP, L_ADD_AT_BOT, L_ADD_BELOW</param>
        /// <returns>false if OK, true on error</returns>
        public static bool pixSaveTiledWithText(this Pix pixs, Pixa pixa, int outwidth, bool newrow, int space, int linewidth, L_Bmf bmf, string textstr, uint val, FlagsForAddingTextToAPix location)
        {
            if (null == pixs ||
                null == pixa)
            {
                throw new ArgumentNullException("pixs, pixa cannot be null.");
            }

            return(Native.DllImports.pixSaveTiledWithText((HandleRef)pixs, (HandleRef)pixa, outwidth, newrow, space, linewidth, (HandleRef)bmf, textstr, val, location));
        }
Exemplo n.º 15
0
        // Font layout
        public static Pix pixAddSingleTextblock(this Pix pixs, L_Bmf bmf, string textstr, uint val, FlagsForAddingTextToAPix location, out int poverflow)
        {
            var pointer = Native.DllImports.pixAddSingleTextblock((HandleRef)pixs, (HandleRef)bmf, textstr, val, (int)location, out poverflow);

            return(new Pix(pointer));
        }