Exemple #1
0
        private static void DrawString(byte[] arr)
        {
            string str = "";
            float  x   = (float)MetaForm.TextPos((int)arr[14], (int)arr[15]);
            float  y   = (float)MetaForm.TextPos((int)arr[18], (int)arr[19]);

            if (MetaForm.transform)
            {
                x = x + MetaForm.transPoint.X;
                y = y + MetaForm.transPoint.Y;
            }
            for (int i = 0; i < arr[8] * 2; i = i + 2)
            {
                str = string.Concat(str, Convert.ToChar(arr[28 + i]));
            }
            MetaForm.Data.Clear();
            MetaForm.Data.point.X  = x;
            MetaForm.Data.point.Y  = y;
            MetaForm.Data.color    = DXFExport.ColorToDXF(Color.FromArgb(MetaForm.r, MetaForm.g, MetaForm.b));
            MetaForm.Data.height   = MetaForm.text_size;
            MetaForm.Data.rotation = 0f;
            MetaForm.Data.text     = str;
            MetaForm.SetTextStyle(MetaForm.text_style);
            MetaForm.Data.point.Y = -MetaForm.Data.point.Y + (float)MetaForm.imgHeight;
            MetaForm.vDXF.AddMText(MetaForm.Data);
        }