Ejemplo n.º 1
0
        private void LoadImage(string fileName)
        {
            // load ezd
            JczLmc.LoadEzdFile(fileName);

            // get image from sdk
            var img = JczLmc.GetCurPreviewImage(
                this.foregroundPictureBox.Width,
                this.foregroundPictureBox.Height);

            // convert to bitmap for rransparent
            var bitMap = (Bitmap)img;

            bitMap.MakeTransparent();

            this.foregroundPictureBox.Image = bitMap;

            this.foregroundPictureBox.Width  = bitMap.Width;
            this.foregroundPictureBox.Height = bitMap.Height;

            this._ezdOriginalImage = bitMap;

            this.InitialFGImage();

            this.ezdFileLbl.Text = Path.GetFileName(fileName);
        }
Ejemplo n.º 2
0
        public static Image UpdateEzdApi(CompetitorData competitor, int width, int height)
        {
            if (!string.IsNullOrEmpty(competitor.FirstName))
            {
                JczLmc.ChangeTextByName(JczLmc.GetEntityNameByIndex(0), competitor.FirstName);
            }

            if (!string.IsNullOrEmpty(competitor.LastName))
            {
                JczLmc.ChangeTextByName(JczLmc.GetEntityNameByIndex(1), competitor.LastName);
            }

            if (!string.IsNullOrEmpty(competitor.TimeOfDistance))
            {
                JczLmc.ChangeTextByName(JczLmc.GetEntityNameByIndex(2), competitor.TimeOfDistance);
            }

            if (!string.IsNullOrEmpty(competitor.Distance))
            {
                JczLmc.ChangeTextByName(JczLmc.GetEntityNameByIndex(3), competitor.Distance);
            }

            var img = JczLmc.GetCurPreviewImage(width, height);

            img = Images.SetImageTransparent(img);

            return(img);
        }
Ejemplo n.º 3
0
        public static Image FontSize(string entName, ModeFontSize mode, int width, int heght)
        {
            StringBuilder font       = new StringBuilder();
            double        height_ezd = 0;
            double        width_ezd  = 0;
            double        angle      = 0;
            double        space      = 0;
            double        line_space = 0;
            bool          bBold      = false;
            int           nTextAlign = 0;
            bool          bItalic    = false;

            int    nTextSpaceMode      = 0;
            double dTextSpace          = 0;
            double dNullCharWidthRatio = 0;

            JczLmc.GetTextEntParam4(entName,
                                    font,
                                    ref nTextSpaceMode,
                                    ref dTextSpace,
                                    ref height_ezd,
                                    ref width_ezd,
                                    ref angle,
                                    ref space,
                                    ref line_space,
                                    ref dNullCharWidthRatio,
                                    ref nTextAlign,
                                    ref bBold,
                                    ref bItalic);
            if (mode == ModeFontSize.Reduce)
            {
                height_ezd = height_ezd - 0.0062d;
                width_ezd  = width_ezd - 0.0062d;
            }
            else
            {
                height_ezd = height_ezd + 0.0062d;
                width_ezd  = width_ezd + 0.0062d;
            }


            JczLmc.SetTextEntParam4(entName,
                                    font.ToString(),
                                    nTextSpaceMode,
                                    dTextSpace,
                                    height_ezd,
                                    width_ezd,
                                    angle,
                                    space,
                                    line_space,
                                    dNullCharWidthRatio,
                                    nTextAlign,
                                    bBold,
                                    bItalic);

            return(JczLmc.GetCurPreviewImage(width, heght));
        }
Ejemplo n.º 4
0
        public static Image UpdateCustomEzd(Tuple <string, string> ezdObj, int width, int height)
        {
            JczLmc.ChangeTextByName(ezdObj.Item1, ezdObj.Item2);

            var img = JczLmc.GetCurPreviewImage(width, height);

            img = PictureControl.Images.SetImageTransparent(img);

            return(img);
        }
Ejemplo n.º 5
0
        public static Image LoadImage(string fileName, int width, int height)
        {
            // load ezd
            JczLmc.LoadEzdFile(fileName);

            // get image from sdk
            var img = JczLmc.GetCurPreviewImage(width, height);

            img = PictureControl.Images.SetImageTransparent(img);

            return(img);
        }