c# - 绘制节点图形绘制 C#
问题描述
编辑:我如何激活滚动条并在滚动后保持我的绘图,如 Paint 应用程序。如您所见,我正在客户端矩形之外绘制一个半径为 25px 的圆,但我无法滚动。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Nodes
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.DoubleBuffered = true;
this.AutoScroll = true;
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
g.DrawEllipse(Pens.Black, new Rectangle(0,this.ClientRectangle.Bottom, 50,50));
}
}
}
解决方案
推荐阅读
- python - 如何在 discord.User cog 中添加角色层次结构?
- python - 如何在 django admin 中从新应用中查看模型?
- react-native - 当新版本有本机更改时,如何在旧目标上部署 Codespush 包
- django - Django 信号在迁移时触发 VersatileImageFieldWarmer
- grafana - 使用过滤器通过 Grafana Dashboard 聚合和查询多个数据源
- flutter - set_checkout_option 谷歌分析事件 - Flutter
- nlp - Flair训练德国NER模型:Dev,f1分数几乎为0.0,为什么模型不学习?
- ibm-cloud - 如何从 IBM watson 的对话技能中调出动作技能?
- javascript - 如何验证赛普拉斯中的悬停文本(工具提示)?
- java - SpringBatch ItemReader 中的分页