internal override void AddToFlatList(List <Shape> list, FlatListPurpose purpose) { base.AddToFlatList(list, purpose); if (purpose == FlatListPurpose.ExposedShapes) { return; // shapes inside this are not exposed } MaskShape.AddToFlatList(list, purpose); Image.AddToFlatList(list, purpose); }
internal override void AddToFlatList(List <Shape> list, FlatListPurpose purpose) { base.AddToFlatList(list, purpose); if (purpose == FlatListPurpose.ExposedShapes) { return; // shapes inside this are not exposed } foreach (Shape shape in Contents) { shape.AddToFlatList(list, purpose); } }
internal override void AddToFlatList(List <Shape> list, FlatListPurpose purpose) { if (purpose == FlatListPurpose.HasTexture) { // will be ignored by base class if (FillStyle.Texture != null) { list.Add(this); } } else { base.AddToFlatList(list, purpose); } }
internal override void AddToFlatList(List <Shape> list, FlatListPurpose purpose) { // We don't call through to the base class which would add this in most cases; instead we have custom logic for whether this shape is included Element.AddToFlatList(list, purpose); switch (purpose) { case FlatListPurpose.ExposedShapes: // don't want to expose contained item itself - this shape substitutes for it if (list.Contains(Element)) { list.Remove(Element); } break; case FlatListPurpose.HasTexture: break; default: list.Add(this); break; } }