コード例 #1
0
            public void Insert(
                int index,
                LayerState item
                )
            {
                int baseIndex = GetBaseIndex(index);

                if (baseIndex == -1)
                {
                    Add(item);
                }
                else
                {
                    PdfArray baseDataObject = BaseDataObject;
                    // Low-level definition.
                    baseDataObject.Insert(baseIndex++, item.Mode.GetName());
                    foreach (Layer layer in item.Layers)
                    {
                        baseDataObject.Insert(baseIndex++, layer.BaseObject);
                    }
                    // High-level definition.
                    items.Insert(index, item);
                    item.Attach(this);
                }
            }
コード例 #2
0
            public void Add(
                LayerState item
                )
            {
                PdfArray baseDataObject = BaseDataObject;

                // Low-level definition.
                baseDataObject.Add(item.Mode.GetName());
                foreach (Layer layer in item.Layers)
                {
                    baseDataObject.Add(layer.BaseObject);
                }
                // High-level definition.
                items.Add(item);
                item.Attach(this);
            }