Exemple #1
0
        override public object Clone(CloneOptions options)
        {
            var display = options?.Display;

            if (display == null)
            {
                return(this.Clone());
            }

            float fac = 1;

            if (options.ApplyRefScale)
            {
                fac = (float)(display.refScale / display.mapScale);
                fac = options.LabelRefScaleFactor(fac);
            }
            fac *= options.DpiFactor;

            GlowingTextSymbol tSym = new GlowingTextSymbol(Current.Engine.CreateFont(_font.Name, Math.Max(_font.Size * fac / display.Screen.LargeFontsFactor, 2f), _font.Style), _brush.Color, _outlinebrush.Color);

            tSym.HorizontalOffset              = HorizontalOffset * fac;
            tSym.VerticalOffset                = VerticalOffset * fac;
            tSym.Angle                         = Angle;
            tSym._align                        = _align;
            tSym.Smoothingmode                 = this.Smoothingmode;
            tSym.GlowingSmoothingmode          = this.GlowingSmoothingmode;
            tSym.GlowingWidth                  = this.GlowingWidth;
            tSym.IncludesSuperScript           = this.IncludesSuperScript;
            tSym.SecondaryTextSymbolAlignments = this.SecondaryTextSymbolAlignments;

            return(tSym);
        }
        override public object Clone(IDisplay display)
        {
            if (display == null)
            {
                return(this.Clone());
            }

            float fac = 1;

            if (display.refScale > 1)
            {
                fac = (float)(display.refScale / display.mapScale);
            }
            if (display.dpi != 96.0)
            {
                fac *= (float)(display.dpi / 96.0);
            }

            GlowingTextSymbol tSym = new GlowingTextSymbol(new Font(_font.Name, Math.Max(_font.Size * fac, 2f), _font.Style), _brush.Color, _outlinebrush.Color);

            tSym.HorizontalOffset     = HorizontalOffset * fac;
            tSym.VerticalOffset       = VerticalOffset * fac;
            tSym.Angle                = Angle;
            tSym._align               = _align;
            tSym.Smoothingmode        = this.Smoothingmode;
            tSym.GlowingSmoothingmode = this.GlowingSmoothingmode;
            tSym.GlowingWidth         = this.GlowingWidth;

            return(tSym);
        }
Exemple #3
0
        public override object Clone()
        {
            GlowingTextSymbol tSym = _font != null && _brush != null && _outlinebrush != null ?
                                     new GlowingTextSymbol(Current.Engine.CreateFont(_font.Name, _font.Size, _font.Style), _brush.Color, _outlinebrush.Color) :
                                     new GlowingTextSymbol();

            tSym.HorizontalOffset              = HorizontalOffset;
            tSym.VerticalOffset                = VerticalOffset;
            tSym.Angle                         = Angle;
            tSym._align                        = _align;
            tSym.Smoothingmode                 = this.Smoothingmode;
            tSym.GlowingSmoothingmode          = this.GlowingSmoothingmode;
            tSym.GlowingWidth                  = this.GlowingWidth;
            tSym.IncludesSuperScript           = this.IncludesSuperScript;
            tSym.SecondaryTextSymbolAlignments = this.SecondaryTextSymbolAlignments;

            return(tSym);
        }