Пример #1
0
        private string genrateStampImage()
        {
            string     stampname = tempDir + MainForm.RandomString(10) + ".png";
            string     k         = html.Text;
            html2image tt        = new html2image(k, System.IO.Directory.GetCurrentDirectory() + "\\" + SettingFolder);

            tt.transprencyKey(System.Drawing.Color.White);
            tt.Generate(stampname, (int)w.Value, (int)h.Value, (float)angle.Value);
            //tt.Generate(stampname);
            tt.close();

            return(stampname);
        }
Пример #2
0
        private string genrateStampImage()
        {
            string stampname = tempDir + RandomString(10) + ".png";
            string k         = System.IO.File.ReadAllText(SettingFolder + "\\" + config.SelectedItem.ToString() + fileext);

            html2image tt = new html2image(k, System.IO.Directory.GetCurrentDirectory() + "\\" + SettingFolder);

            int sc = k.IndexOf("$-->");

            string[] sl = k.Substring(5, sc - 5).Split(',');
            tt.transprencyKey(System.Drawing.Color.White);
            x           = Convert.ToInt32(sl[2]);
            y           = Convert.ToInt32(sl[3]);
            anchor      = (UCS.Corner)Convert.ToInt32(sl[4]);
            transprancy = Convert.ToInt32(sl[5]);
            angle       = Convert.ToInt32(sl[6]);

            tt.Generate(stampname, Convert.ToInt32(sl[0]), Convert.ToInt32(sl[1]), angle);
            tt.close();

            return(stampname);
        }