コード例 #1
0
ファイル: EditorPresenter.cs プロジェクト: ag-csharp/Core2D
        /// <inheritdoc/>
        public void Render(object dc, IShapeRenderer renderer, IPageContainer container, double dx, double dy)
        {
            renderer.Draw(dc, container, dx, dy);

            if (container.WorkingLayer != null)
            {
                renderer.Draw(dc, container.WorkingLayer, dx, dy);
            }

            if (container.HelperLayer != null)
            {
                renderer.Draw(dc, container.HelperLayer, dx, dy);
            }
        }
コード例 #2
0
ファイル: ExportPresenter.cs プロジェクト: bamfbamf/Core2D
        /// <inheritdoc/>
        public void Render(object dc, IShapeRenderer renderer, IPageContainer container, double dx, double dy)
        {
            renderer.Fill(dc, dx, dy, container.Width, container.Height, container.Background);

            var db = container.Data == null ? default : container.Data.Properties;

                     var r = container.Data == null ? default : container.Data.Record;

                             if (container.Template != null)
                             {
                                 renderer.Draw(dc, container.Template, dx, dy, db, r);
                             }

                             renderer.Draw(dc, container, dx, dy, db, r);
        }
コード例 #3
0
ファイル: EllipseShape.cs プロジェクト: ag-csharp/Core2D
 /// <inheritdoc/>
 public override void DrawShape(object dc, IShapeRenderer renderer, double dx, double dy)
 {
     if (State.Flags.HasFlag(ShapeStateFlags.Visible))
     {
         renderer.Draw(dc, this, dx, dy);
         base.DrawShape(dc, renderer, dx, dy);
     }
 }
コード例 #4
0
        /// <inheritdoc/>
        public void Render(object dc, IShapeRenderer renderer, IPageContainer container, double dx, double dy)
        {
            var flags = renderer.State.DrawShapeState.Flags;

            renderer.State.DrawShapeState.Flags = ShapeStateFlags.Printable;

            renderer.Fill(dc, dx, dy, container.Width, container.Height, container.Background);

            if (container.Template != null)
            {
                renderer.Draw(dc, container.Template, dx, dy);
            }

            renderer.Draw(dc, container, dx, dy);

            renderer.State.DrawShapeState.Flags = flags;
        }
コード例 #5
0
        /// <inheritdoc/>
        public void Render(object dc, IShapeRenderer renderer, IPageContainer container, double dx, double dy)
        {
            renderer.Fill(dc, dx, dy, container.Width, container.Height, container.Background);

            if (container.Template != null)
            {
                renderer.Draw(dc, container.Template, dx, dy);
            }
        }
コード例 #6
0
        /// <inheritdoc/>
        public void Render(object dc, IShapeRenderer renderer, IPageContainer container, double dx, double dy)
        {
            var db = container.Data == null ? default : container.Data.Properties;

                     var r = container.Data == null ? default : container.Data.Record;

                             renderer.Draw(dc, container, dx, dy, db, r);

                             if (container.WorkingLayer != null)
                             {
                                 renderer.Draw(dc, container.WorkingLayer, dx, dy, db, r);
                             }

                             if (container.HelperLayer != null)
                             {
                                 renderer.Draw(dc, container.HelperLayer, dx, dy, db, r);
                             }
        }
コード例 #7
0
ファイル: EllipseShape.cs プロジェクト: will8886/Core2D
        /// <inheritdoc/>
        public override void Draw(object dc, IShapeRenderer renderer, double dx, double dy)
        {
            if (State.Flags.HasFlag(ShapeStateFlags.Visible))
            {
                var state = base.BeginTransform(dc, renderer);

                renderer.Draw(dc, this, dx, dy);

                base.EndTransform(dc, renderer, state);

                base.Draw(dc, renderer, dx, dy);
            }
        }
コード例 #8
0
        /// <inheritdoc/>
        public override void Draw(object dc, IShapeRenderer renderer, double dx, double dy, object db, object r)
        {
            var record = Data?.Record ?? r;

            if (State.Flags.HasFlag(ShapeStateFlags.Visible))
            {
                var state = base.BeginTransform(dc, renderer);

                renderer.Draw(dc, this, dx, dy, db, record);

                base.EndTransform(dc, renderer, state);

                base.Draw(dc, renderer, dx, dy, db, record);
            }
        }