public AdornmentLayer(IWpfTextView textView, LayerKind layerKind, MetadataAndOrder <IAdornmentLayersMetadata> info) { TextView = textView ?? throw new ArgumentNullException(nameof(textView)); this.layerKind = layerKind; Info = info; adornmentLayerElements = new List <AdornmentLayerElement>(); }
public AdornmentLayer(IWpfTextView textView, LayerKind layerKind, MetadataAndOrder<IAdornmentLayersMetadata> info) { if (textView == null) throw new ArgumentNullException(nameof(textView)); TextView = textView; this.layerKind = layerKind; Info = info; adornmentLayerElements = new List<AdornmentLayerElement>(); }
public AdornmentLayerCollection(IWpfTextView wpfTextView, LayerKind layerKind) { this.wpfTextView = wpfTextView ?? throw new ArgumentNullException(nameof(wpfTextView)); this.layerKind = layerKind; adornmentLayers = new List<AdornmentLayer>(); if (layerKind != LayerKind.Normal) ClipToBounds = true; wpfTextView.Closed += WpfTextView_Closed; wpfTextView.LayoutChanged += WpfTextView_LayoutChanged; }
public AdornmentLayerCollection(IWpfTextView wpfTextView, LayerKind layerKind) { if (wpfTextView == null) throw new ArgumentNullException(nameof(wpfTextView)); this.wpfTextView = wpfTextView; this.layerKind = layerKind; adornmentLayers = new List<AdornmentLayer>(); if (layerKind != LayerKind.Normal) ClipToBounds = true; wpfTextView.Closed += WpfTextView_Closed; wpfTextView.LayoutChanged += WpfTextView_LayoutChanged; }
public void Unserialize(GMDataReader reader) { Name = reader.ReadStringPointerObject(); ID = reader.ReadInt32(); Kind = (LayerKind)reader.ReadInt32(); Depth = reader.ReadInt32(); OffsetX = reader.ReadSingle(); OffsetY = reader.ReadSingle(); HSpeed = reader.ReadSingle(); VSpeed = reader.ReadSingle(); Visible = reader.ReadWideBoolean(); switch (Kind) { case LayerKind.Background: Background = new LayerBackground(); Background.Unserialize(reader); break; case LayerKind.Instances: Instances = new LayerInstances(); Instances.Unserialize(reader); break; case LayerKind.Assets: Assets = new LayerAssets(); Assets.Unserialize(reader); break; case LayerKind.Tiles: Tiles = new LayerTiles(); Tiles.Unserialize(reader); break; case LayerKind.Effect: Effect = new LayerEffect(); Effect.Unserialize(reader); break; default: reader.Warnings.Add(new GMWarning($"Unknown layer kind {Kind}")); break; } }
/// <summary> /// Constructor /// </summary> /// <param name="kind">Kind of layer</param> public LayerKindAttribute(LayerKind kind) { LayerKind = kind; }
/// <summary> /// Constructor /// </summary> /// <param name="kind">Kind of layer</param> public LayerKindAttribute(LayerKind kind) => LayerKind = kind;