Beispiel #1
0
            protected virtual InverseTickSpacing SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                InverseTickSpacing s = null != o ? (InverseTickSpacing)o : new InverseTickSpacing();

                s._orgGrace      = info.GetDouble("MinGrace");
                s._endGrace      = info.GetDouble("MaxGrace");
                s._snapOrgToTick = (BoundaryTickSnapping)info.GetEnum("SnapOrgToTick", typeof(BoundaryTickSnapping));
                s._snapEndToTick = (BoundaryTickSnapping)info.GetEnum("SnapEndToTick", typeof(BoundaryTickSnapping));

                s._targetNumberOfMajorTicks = info.GetInt32("TargetNumberOfMajorTicks");
                s._targetNumberOfMinorTicks = info.GetInt32("TargetNumberOfMinorTicks");
                s._userDefinedMajorSpan     = info.GetNullableDouble("UserDefinedMajorSpan");
                s._userDefinedMinorTicks    = info.GetNullableInt32("UserDefinedMinorTicks");

                s._transformationOffset              = info.GetDouble("TransformationOffset");
                s._transformationDivider             = info.GetDouble("TransformationDivider");
                s._transformationOperationIsMultiply = info.GetBoolean("TransformationIsMultiply");

                s.ChildSetMember(ref s._suppressedMajorTicks, (SuppressedTicks)info.GetValue("SuppressedMajorTicks", s));
                s.ChildSetMember(ref s._suppressedMinorTicks, (SuppressedTicks)info.GetValue("SuppressedMinorTicks", s));
                s.ChildSetMember(ref s._additionalMajorTicks, (AdditionalTicks)info.GetValue("AdditionalMajorTicks", s));
                s.ChildSetMember(ref s._additionalMinorTicks, (AdditionalTicks)info.GetValue("AdditionalMinorTicks", s));

                if (s._suppressedMajorTicks == null)
                {
                    s._suppressedMajorTicks = new SuppressedTicks()
                    {
                        ParentObject = s
                    }
                }
                ;
                if (s._suppressedMinorTicks == null)
                {
                    s._suppressedMinorTicks = new SuppressedTicks()
                    {
                        ParentObject = s
                    }
                }
                ;

                if (s._additionalMajorTicks == null)
                {
                    s._additionalMajorTicks = new AdditionalTicks()
                    {
                        ParentObject = s
                    }
                }
                ;
                if (s._additionalMinorTicks == null)
                {
                    s._additionalMinorTicks = new AdditionalTicks()
                    {
                        ParentObject = s
                    }
                }
                ;

                return(s);
            }
        }
Beispiel #2
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                double abs = info.GetDouble("MinAbsoluteSize");
                double rel = info.GetDouble("MinRelativeSize");

                return(new ContourDisc10Min(abs, rel));
            }
Beispiel #3
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                LinePlotStyle s = (LinePlotStyle)o ?? new LinePlotStyle(info);

                s._independentSkipFrequency = info.GetBoolean("IndependentSkipFreq");
                s._skipFrequency            = info.GetInt32("SkipFreq");

                s._ignoreMissingDataPoints          = info.GetBoolean("IgnoreMissingDataPoints");
                s._independentOnShiftingGroupStyles = info.GetBoolean("IndependentOnShiftingGroupStyles");

                s._connectCircular = info.GetBoolean("ConnectCircular");
                s._connectionStyle = (ILineConnectionStyle)info.GetValue("Connection", s);

                s._linePen = (PenX)info.GetValue("Pen", s);
                if (null != s._linePen)
                {
                    s._linePen.ParentObject = s;
                }

                s._independentDashStyle = info.GetBoolean("IndependentDashStyle");
                s._independentColor     = info.GetBoolean("IndependentColor");

                s._independentSymbolSize = info.GetBoolean("IndependentSymbolSize");
                s._symbolSize            = info.GetDouble("SymbolSize");

                s._useSymbolGap    = info.GetBoolean("UseSymbolGap");
                s._symbolGapOffset = info.GetDouble("SymbolGapOffset");
                s._symbolGapFactor = info.GetDouble("SymbolGapFactor");

                return(s);
            }
            protected virtual ColumnDrivenSymbolSizePlotStyle SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = (ColumnDrivenSymbolSizePlotStyle)o ?? new ColumnDrivenSymbolSizePlotStyle(info);

                s._dataColumnProxy = (IReadableColumnProxy)info.GetValue("DataColumn", s);
                if (null != s._dataColumnProxy)
                {
                    s._dataColumnProxy.ParentObject = s;
                }

                s._scale = (NumericalScale)info.GetValue("Scale", s);
                if (null != s._scale)
                {
                    s._scale.ParentObject = s;
                }

                s._symbolSizeAt0     = info.GetDouble("SymbolSizeAt0");
                s._symbolSizeAt1     = info.GetDouble("SymbolSizeAt1");
                s._symbolSizeBelow   = info.GetDouble("SymbolSizeBelow");
                s._symbolSizeAbove   = info.GetDouble("SymbolSizeAbove");
                s._symbolSizeInvalid = info.GetDouble("SymbolSizeInvalid");
                s._numberOfSteps     = info.GetInt32("NumberOfSteps");

                return(s);
            }
Beispiel #5
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                double size1 = info.GetDouble("Size1");
                double size2 = info.GetDouble("Size2");

                return(new Octagonal(size1, size2));
            }
Beispiel #6
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                DensityImagePlotStyle s = null != o ? (DensityImagePlotStyle)o : new DensityImagePlotStyle();

                var scalingStyle = (ScalingStyle)info.GetEnum("ScalingStyle", typeof(ScalingStyle));
                var vRangeFrom   = info.GetDouble("RangeFrom");
                var vRangeTo     = info.GetDouble("RangeTo");

                s._clipToLayer = info.GetBoolean("ClipToLayer");
                var colorBelow   = (NamedColor)info.GetValue("ColorBelow", s);
                var colorAbove   = (NamedColor)info.GetValue("ColorAbove", s);
                var colorInvalid = (NamedColor)info.GetValue("ColorInvalid", s);

                var colorProvider = ColorProviderBGMYR.NewFromColorBelowAboveInvalidAndTransparency(colorBelow, colorAbove, colorInvalid, 0);
                var scale         = scalingStyle == ScalingStyle.Logarithmic ? new Log10Scale() : (NumericalScale) new LinearScale();

                scale.Rescaling.SetUserParameters(
                    double.IsNaN(vRangeFrom) ? Altaxo.Graph.Scales.Rescaling.BoundaryRescaling.Auto : Altaxo.Graph.Scales.Rescaling.BoundaryRescaling.Fixed,
                    vRangeFrom,
                    double.IsNaN(vRangeTo) ? Altaxo.Graph.Scales.Rescaling.BoundaryRescaling.Auto : Altaxo.Graph.Scales.Rescaling.BoundaryRescaling.Fixed,
                    vRangeTo);

                s.Scale         = scale;
                s.ColorProvider = colorProvider;

                return(s);
            }
Beispiel #7
0
            protected virtual LinearTickSpacing SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                LinearTickSpacing s = null != o ? (LinearTickSpacing)o : new LinearTickSpacing();

                s._zeroLever     = info.GetDouble("ZeroLever");
                s._orgGrace      = info.GetDouble("MinGrace");
                s._endGrace      = info.GetDouble("MaxGrace");
                s._snapOrgToTick = (BoundaryTickSnapping)info.GetEnum("SnapOrgToTick", typeof(BoundaryTickSnapping));
                s._snapEndToTick = (BoundaryTickSnapping)info.GetEnum("SnapEndToTick", typeof(BoundaryTickSnapping));

                s._targetNumberOfMajorTicks = info.GetInt32("TargetNumberOfMajorTicks");
                s._targetNumberOfMinorTicks = info.GetInt32("TargetNumberOfMinorTicks");
                s._userDefinedMajorSpan     = info.GetNullableDouble("UserDefinedMajorSpan");
                s._userDefinedMinorTicks    = info.GetNullableInt32("UserDefinedMinorTicks");

                s._transformationOffset              = info.GetDouble("TransformationOffset");
                s._transformationDivider             = info.GetDouble("TransformationDivider");
                s._transformationOperationIsMultiply = info.GetBoolean("TransformationIsMultiply");

                s.SuppressedMajorTicks = (SuppressedTicks)info.GetValue("SuppressedMajorTicks", s);
                s.SuppressedMinorTicks = (SuppressedTicks)info.GetValue("SuppressedMinorTicks", s);
                s.AdditionalMajorTicks = (AdditionalTicks)info.GetValue("AdditionalMajorTicks", s);
                s.AdditionalMinorTicks = (AdditionalTicks)info.GetValue("AdditionalMinorTicks", s);

                return(s);
            }
Beispiel #8
0
            protected virtual RealFourierTransformation2DOptions SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = (o == null ? new RealFourierTransformation2DOptions() : (RealFourierTransformation2DOptions)o);

                s._isUserDefinedRowIncrementValue = info.GetBoolean("IsUserDefinedRowIncrementValue");
                s._rowIncrementValue = info.GetDouble("RowIncrementValue");
                s._isUserDefinedColumnIncrementValue = info.GetBoolean("IsUserDefinedColumnIncrementValue");
                s._columnIncrementValue = info.GetDouble("ColumnIncrementValue");
                s._replacementValueForNaNMatrixElements      = info.GetNullableDouble("ReplacementValueForNaNMatrixElements");
                s._replacementValueForInfiniteMatrixElements = info.GetNullableDouble("ReplacementValueForInfiniteMatrixElements");
                s._dataPretreatmentCorrectionOrder           = info.GetNullableInt32("DataPretreatmentCorrectionOrder");
                s._fourierWindow = (Altaxo.Calc.Fourier.Windows.IWindows2D)info.GetValue("FourierWindow", s);

                s._kindOfOutputResult      = (RealFourierTransformationOutputKind)info.GetEnum("KindOfOutputResult", typeof(RealFourierTransformationOutputKind));
                s._centerResult            = info.GetBoolean("CenterResult");
                s._resultFractionOfRows    = info.GetDouble("ResultFractionOfRows");
                s._resultFractionOfColumns = info.GetDouble("ResultFractionOfColumns");

                s._outputFrequencyHeaderColumns    = info.GetBoolean("OutputFrequencyHeaderColumns");
                s._frequencyRowHeaderColumnName    = info.GetString("FrequencyRowHeaderColumnName");
                s._frequencyColumnHeaderColumnName = info.GetString("FrequencyColumnHeaderColumnName");

                s._outputPeriodHeaderColumns    = info.GetBoolean("OutputPeriodHeaderColumns");
                s._periodRowHeaderColumnName    = info.GetString("PeriodRowHeaderColumnName");
                s._periodColumnHeaderColumnName = info.GetString("PeriodColumnHeaderColumnName");

                return(s);
            }
Beispiel #9
0
            protected virtual CSLineID SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                CSLineID s = (o == null ? new CSLineID() : (CSLineID)o);

                s._parallelAxisNumber = info.GetInt32("Axis");

                s._logicalValueFirstOther     = info.GetDouble("Logical1");
                s._usePhysicalValueFirstOther = info.GetBoolean("UsePhysical1");
                if (s._usePhysicalValueFirstOther)
                {
                    s._physicalValueFirstOther = (AltaxoVariant)info.GetValue("Physical1", s);
                }

                bool is3D = info.GetBoolean("Is3D");

                if (is3D)
                {
                    s._logicalValueSecondOther     = info.GetDouble("Logical1");
                    s._usePhysicalValueSecondOther = info.GetBoolean("UsePhysical2");
                    if (s._usePhysicalValueSecondOther)
                    {
                        s._physicalValueSecondOther = (AltaxoVariant)info.GetValue("Physical2", s);
                    }
                }

                return(s);
            }
Beispiel #10
0
            public static object SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent, bool nativeCall)
            {
                LabelPlotStyle s = null != o ? (LabelPlotStyle)o : new LabelPlotStyle();

                s._font               = (Font)info.GetValue("Font", s);
                s._independentColor   = info.GetBoolean("IndependentColor");
                s._brush              = (BrushX)info.GetValue("Brush", s);
                s._xOffset            = info.GetDouble("XOffset");
                s._yOffset            = info.GetDouble("YOffset");
                s._rotation           = info.GetDouble("Rotation");
                s.HorizontalAlignment = (System.Drawing.StringAlignment)info.GetEnum("HorizontalAlignment", typeof(System.Drawing.StringAlignment));
                s.VerticalAlignment   = (System.Drawing.StringAlignment)info.GetEnum("VerticalAlignment", typeof(System.Drawing.StringAlignment));
                s.AttachedAxis        = (CSPlaneID)info.GetValue("AttachedAxis", s);
                s._backgroundStyle    = (IBackgroundStyle)info.GetValue("Background", s);
                s._labelColumn        = (Altaxo.Data.ReadableColumnProxy)info.GetValue("LabelColumn", parent);


                if (nativeCall)
                {
                    // restore the cached values
                    s.SetCachedValues();
                    s.CreateEventChain();
                }

                return(s);
            }
Beispiel #11
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = new CSLineID
                {
                    _parallelAxisNumber = info.GetInt32("Axis"),

                    _logicalValueFirstOther     = info.GetDouble("Logical1"),
                    _usePhysicalValueFirstOther = info.GetBoolean("UsePhysical1")
                };

                if (s._usePhysicalValueFirstOther)
                {
                    s._physicalValueFirstOther = (AltaxoVariant)info.GetValue("Physical1", s);
                }

                bool is3D = info.GetBoolean("Is3D");

                if (is3D)
                {
                    s._logicalValueSecondOther     = info.GetDouble("Logical1");
                    s._usePhysicalValueSecondOther = info.GetBoolean("UsePhysical2");
                    if (s._usePhysicalValueSecondOther)
                    {
                        s._physicalValueSecondOther = (AltaxoVariant)info.GetValue("Physical2", s);
                    }
                }

                return(s);
            }
Beispiel #12
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                AxisLabelStyle s = null != o ? (AxisLabelStyle)o : new AxisLabelStyle(info);

                s._font                   = (FontX)info.GetValue("Font", s);
                s._brush                  = (BrushX)info.GetValue("Brush", s);
                s._backgroundStyle        = (IBackgroundStyle)info.GetValue("Background", s);
                s._automaticRotationShift = info.GetBoolean("AutoAlignment");
                s._horizontalAlignment    = (StringAlignment)info.GetEnum("HorzAlignment", typeof(StringAlignment));
                s._verticalAlignment      = (StringAlignment)info.GetEnum("VertAlignment", typeof(StringAlignment));
                s._rotation               = info.GetDouble("Rotation");
                s._xOffset                = info.GetDouble("XOffset");
                s._yOffset                = info.GetDouble("YOffset");

                s._labelFormatting = (ILabelFormatting)info.GetValue("LabelFormat", s);
                s._labelFormatting.ParentObject = s;

                s._suppressedLabels = new SuppressedTicks()
                {
                    ParentObject = s
                };

                // Modification of StringFormat is necessary to avoid
                // too big spaces between successive words
                s._stringFormat              = (StringFormat)StringFormat.GenericTypographic.Clone();
                s._stringFormat.FormatFlags |= StringFormatFlags.MeasureTrailingSpaces;

                return(s);
            }
Beispiel #13
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                LinearScale s = null != o ? (LinearScale)o : new LinearScale();

                s._baseOrg = info.GetDouble("BaseOrg");
                s._baseEnd = info.GetDouble("BaseEnd");

                s._majorSpan  = info.GetDouble("MajorSpan");
                s._minorTicks = info.GetInt32("MinorTicks");

                s._axisOrgByMajor = info.GetDouble("OrgByMajor");
                s._axisEndByMajor = info.GetDouble("EndByMajor");

                bool AxisOrgFixed = info.GetBoolean("OrgFixed");
                bool AxisEndFixed = info.GetBoolean("EndFixed");

                s._dataBounds = (FiniteNumericalBoundaries)info.GetValue("Bounds", s);

                s.SetCachedValues();
                // restore the event chain
                s._dataBounds.ParentObject = s;

                s._rescaling = new LinearScaleRescaleConditions();
                s._rescaling.SetUserParameters(AxisOrgFixed ? BoundaryRescaling.Fixed : BoundaryRescaling.Auto, s.Org, AxisEndFixed ? BoundaryRescaling.Fixed : BoundaryRescaling.Auto, s.End);
                s._rescaling.ParentObject = s;

                return(s);
            }
Beispiel #14
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                Log10Scale s = null != o ? (Log10Scale)o : new Log10Scale();

                s._log10Org = (double)info.GetDouble("Log10Org");
                s._log10End = (double)info.GetDouble("Log10End");

                s._decadesPerMajorTick = (int)info.GetInt32("DecadesPerMajor");

                bool AxisOrgFixed = (bool)info.GetBoolean("OrgFixed");
                bool AxisEndFixed = (bool)info.GetBoolean("EndFixed");

                s._dataBounds = (PositiveFiniteNumericalBoundaries)info.GetValue("Bounds", typeof(PositiveFiniteNumericalBoundaries));

                s._dataBounds.BoundaryChanged += new BoundaryChangedHandler(s.OnBoundariesChanged);


                s._rescaling = new LogarithmicAxisRescaleConditions();
                s._rescaling.SetOrgAndEnd(AxisOrgFixed ? BoundaryRescaling.Fixed : BoundaryRescaling.Auto, s.Org, AxisEndFixed ? BoundaryRescaling.Fixed:BoundaryRescaling.Auto, s.End);

                LogarithmicAxisRescaleConditions rescaling = new LogarithmicAxisRescaleConditions();

                rescaling.SetOrgAndEnd(AxisOrgFixed ? BoundaryRescaling.Fixed : BoundaryRescaling.Auto, s.Org, AxisEndFixed ? BoundaryRescaling.Fixed:BoundaryRescaling.Auto, s.End);
                s._rescaling = rescaling;

                return(s);
            }
Beispiel #15
0
            protected virtual ItemLocationDirect SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = null != o ? (ItemLocationDirect)o : new ItemLocationDirect();

                s._parentSize = (PointD2D)info.GetValue("ParentSize", s);

                s._sizeX = (RADouble)info.GetValue("SizeX", s);
                s._sizeY = (RADouble)info.GetValue("SizeY", s);

                s._positionX = (RADouble)info.GetValue("PositionX", s);
                s._positionY = (RADouble)info.GetValue("PositionY", s);

                s._localAnchorX = (RADouble)info.GetValue("LocalAnchorX", s);
                s._localAnchorY = (RADouble)info.GetValue("LocalAnchorY", s);

                s._parentAnchorX = (RADouble)info.GetValue("ParentAnchorX", s);
                s._parentAnchorY = (RADouble)info.GetValue("ParentAnchorY", s);

                s._rotation = info.GetDouble("Rotation");
                s._shear    = info.GetDouble("ShearX");
                s._scaleX   = info.GetDouble("ScaleX");
                s._scaleY   = info.GetDouble("ScaleY");

                return(s);
            }
Beispiel #16
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                NumericScaleRescaleConditions s = null != o ? (NumericScaleRescaleConditions)o : new LinearScaleRescaleConditions();

                s._userProvidedOrgRelativeTo = BoundariesRelativeTo.Absolute;
                s._userProvidedEndRelativeTo = BoundariesRelativeTo.Absolute;

                var orgRescaling  = (BoundaryRescaling)(int)info.GetEnum("OrgRescaling", typeof(BoundaryRescalingV1));
                var org           = info.GetDouble("Org");
                var endRescaling  = (BoundaryRescaling)(int)info.GetEnum("EndRescaling", typeof(BoundaryRescalingV1));
                var end           = info.GetDouble("End");
                var spanRescaling = (BoundaryRescaling)(int)info.GetEnum("SpanRescaling", typeof(BoundaryRescalingV1));
                var span          = info.GetDouble("Span");

                if (4 == (int)orgRescaling)
                {
                    orgRescaling = BoundaryRescaling.Auto;
                }
                if (4 == (int)endRescaling)
                {
                    endRescaling = BoundaryRescaling.Auto;
                }

                s._orgRescaling         = orgRescaling;
                s._endRescaling         = endRescaling;
                s._userProvidedOrgValue = org;
                s._userProvidedEndValue = end;

                s._resultingOrg = org;
                s._resultingEnd = end;

                return(s);
            }
Beispiel #17
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                LinearScale s = null != o ? (LinearScale)o : new LinearScale();

                s._baseOrg = (double)info.GetDouble("BaseOrg");
                s._baseEnd = (double)info.GetDouble("BaseEnd");

                s._majorSpan  = (double)info.GetDouble("MajorSpan");
                s._minorTicks = (int)info.GetInt32("MinorTicks");

                s._axisOrgByMajor = (double)info.GetDouble("OrgByMajor");
                s._axisEndByMajor = (double)info.GetDouble("EndByMajor");

                bool AxisOrgFixed = (bool)info.GetBoolean("OrgFixed");
                bool AxisEndFixed = (bool)info.GetBoolean("EndFixed");

                s._dataBounds = (FiniteNumericalBoundaries)info.GetValue("Bounds", s);

                s.SetCachedValues();
                // restore the event chain
                s._dataBounds.BoundaryChanged += new BoundaryChangedHandler(s.OnBoundariesChanged);

                s._rescaling = new NumericAxisRescaleConditions();
                s._rescaling.SetOrgAndEnd(AxisOrgFixed ? BoundaryRescaling.Fixed : BoundaryRescaling.Auto, s.Org, AxisEndFixed ? BoundaryRescaling.Fixed:BoundaryRescaling.Auto, s.End);

                return(s);
            }
Beispiel #18
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var x = info.GetDouble("X");
                var y = info.GetDouble("Y");

                return(new VectorD2D(x, y));
            }
Beispiel #19
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var start     = info.GetDouble("StartValue");
                var increment = info.GetDouble("Increment");

                return(new EquallySpacedColumn(start, increment));
            }
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                double smoothness        = info.GetDouble("Smoothness");
                double metalness         = info.GetDouble("Metalness");
                double indexOfRefraction = info.GetDouble("IndexOfRefraction");

                return(new MaterialWithoutColorOrTexture(smoothness, metalness, indexOfRefraction));
            }
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                EquallySpacedColumn s = null != o ? (EquallySpacedColumn)o : new EquallySpacedColumn(0, 1);

                s.m_Start     = info.GetDouble("StartValue");
                s.m_Increment = info.GetDouble("Increment");
                return(s);
            }
Beispiel #22
0
            public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var name      = info.GetString("Name");
                var parameter = info.GetDouble("Value");
                var variance  = info.GetDouble("Variance");
                var vary      = info.GetBoolean("Vary");

                return(new ParameterSetElement(name, parameter, variance, vary));
            }
Beispiel #23
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                double smoothness        = info.GetDouble("Smoothness");
                double metalness         = info.GetDouble("Metalness");
                double indexOfRefraction = info.GetDouble("IndexOfRefraction");
                var    color             = (NamedColor)info.GetValue("Color", null);

                return(new MaterialWithUniformColor(color, smoothness, metalness, indexOfRefraction));
            }
Beispiel #24
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = null != o ? (VisibleLightSpectrum)o : new VisibleLightSpectrum();

                info.GetBaseValueEmbedded(s, typeof(ColorProviderBase), parent);
                s._gamma      = info.GetDouble("Gramma");
                s._brightness = info.GetDouble("Brightness");
                return(s);
            }
Beispiel #25
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = (HatchBrushBase)o;

                s._repeatLengthPt  = info.GetDouble("RepeatLength");
                s._structureFactor = info.GetDouble("StructureFactor");

                return(s);
            }
Beispiel #26
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                NumericalBoundaries s = (NumericalBoundaries)o;

                s._numberOfItems = info.GetInt32("NumberOfItems");
                s._minValue      = info.GetDouble("MinValue");
                s._maxValue      = info.GetDouble("MaxValue");

                return(s);
            }
Beispiel #27
0
            protected virtual DropLinePlotStyle SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                DropLinePlotStyle s = null != o ? (DropLinePlotStyle)o : new DropLinePlotStyle(info);

                s._independentSkipFreq           = info.GetBoolean("IndependentSkipFreq");
                s._skipFreq                      = info.GetInt32("SkipFreq");
                s._dropTargets                   = (CSPlaneIDList)info.GetValue("DropLine", s);
                s._additionalDropTargetIsEnabled = info.GetBoolean("HasAdditionalDropTarget");
                if (s._additionalDropTargetIsEnabled)
                {
                    s._additionalDropTargetPerpendicularAxis    = info.GetInt32("AdditionalDropTargetAxis");
                    s._additionalDropTargetUsePhysicalBaseValue = info.GetBoolean("AdditionalDropTargetUsePhysicalValue");
                    s._additionalDropTargetBaseValue            = (Altaxo.Data.AltaxoVariant)info.GetValue("AdditionalDropTargetBaseValue", s);
                }

                s._pen = (PenX3D)info.GetValue("Pen", s);
                s._independentColor = info.GetBoolean("IndependentColor");

                s._independentSymbolSize = info.GetBoolean("IndependentSymbolSize");
                s._symbolSize            = info.GetDouble("SymbolSize");

                s._lineWidth1Offset = info.GetDouble("LineWidth1Offset");
                s._lineWidth1Factor = info.GetDouble("LineWidth1Factor");

                s._lineWidth2Offset = info.GetDouble("LineWidth2Offset");
                s._lineWidth2Factor = info.GetDouble("LineWidth2Factor");

                s._gapAtStartOffset = info.GetDouble("GapAtStartOffset");
                s._gapAtStartFactor = info.GetDouble("GapAtStartFactor");
                s._gapAtEndOffset   = info.GetDouble("GapAtEndOffset");
                s._gapAtEndFactor   = info.GetDouble("GapAtEndFactor");
                return(s);
            }
Beispiel #28
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = null != o ? (TextureScaling)o : new TextureScaling();

                s._scalingMode      = (TextureScalingMode)info.GetEnum("Mode", typeof(TextureScalingMode));
                s._aspectPreserving = (AspectRatioPreservingMode)info.GetEnum("AspectPreserving", typeof(AspectRatioPreservingMode));
                s._x = info.GetDouble("X");
                s._y = info.GetDouble("Y");

                return(s);
            }
Beispiel #29
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = (RandomCircles)o ?? new RandomCircles();

                info.GetBaseValueEmbedded(s, s.GetType().BaseType, parent);

                s._randomSeed       = info.GetInt32("RandomSeed");
                s._circleDiameterPt = info.GetDouble("CircleDiameter");
                s._fillingFactor    = info.GetDouble("FillingFactor");
                return(s);
            }
Beispiel #30
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                WaterfallTransform s = null != o ? (WaterfallTransform)o : new WaterfallTransform();

                s._scaleXInc   = info.GetDouble("XScale");
                s._scaleYInc   = info.GetDouble("YScale");
                s._useClipping = info.GetBoolean("UseClipping");
                s._xinc        = info.GetDouble("XInc");
                s._yinc        = info.GetDouble("YInc");
                return(s);
            }