📄 form1.cs
字号:
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Threading;
using System.IO;
using System.Reflection;
using System.Drawing.Imaging;
using System.Drawing.Text;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace GDIPlusDemo
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem FadeInOut;
private System.Windows.Forms.MenuItem GrayScale;
private System.Windows.Forms.MenuItem Inverse;
private System.Windows.Forms.MenuItem Emboss;
private System.Windows.Forms.MenuItem CreatePenFromBrush;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem DashStyle_Custom;
private System.Windows.Forms.MenuItem Pen_Align;
private System.Windows.Forms.MenuItem Pen_Tranform;
private System.Windows.Forms.MenuItem Pen_LineCap;
private System.Windows.Forms.MenuItem Pen_TransColor;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem Brush_SolidBrush;
private System.Windows.Forms.MenuItem Brush_FillVurve;
private System.Windows.Forms.MenuItem Brush_HatchBrush;
private System.Windows.Forms.MenuItem Brush_EnumAllStyle;
private System.Windows.Forms.MenuItem Brush_SetRenderingOrigin;
private System.Windows.Forms.MenuItem Brush_Texture;
private System.Windows.Forms.MenuItem Brush_Texture_WrapMode;
private System.Windows.Forms.MenuItem Brush_TextureTransform;
private System.Windows.Forms.MenuItem Brush_GetTextureMatrix;
private System.Windows.Forms.MenuItem Brush_LinearGradientBrush;
private System.Windows.Forms.MenuItem Brush_LinearArrange;
private System.Windows.Forms.MenuItem Brush_LinearGradientMode;
private System.Windows.Forms.MenuItem Brush_LinearAngle;
private System.Windows.Forms.MenuItem Brush_LinearInterpolation;
private System.Windows.Forms.MenuItem Brush_LinearCustomize;
private System.Windows.Forms.MenuItem menuItem7;
private System.Windows.Forms.MenuItem menuItem6;
private System.Windows.Forms.MenuItem menuItem5;
private System.Windows.Forms.MenuItem menuItem10;
private System.Windows.Forms.MenuItem Brush_LinearGradientBrush_BellShape;
private System.Windows.Forms.MenuItem menuItem4;
private System.Windows.Forms.MenuItem Brush_PathGradientBrush_Star;
private System.Windows.Forms.MenuItem Brush_PathGradientBrush_Star2;
private System.Windows.Forms.MenuItem Brush_Using_MorePathGradientBrush;
private System.Windows.Forms.MenuItem Brush_PathGradientBrush_WrapMode;
private System.Windows.Forms.MenuItem Brush_PathGradientBrush_CenterPoint;
private System.Windows.Forms.MenuItem Brush_PathGradientBrush_InterpolationColors;
private System.Windows.Forms.MenuItem Brsuh_PathGradietBrush_Focus;
private System.Windows.Forms.MenuItem Brush_PathGradientBrush_Transform;
private System.Windows.Forms.MenuItem Brsuh_LinearGradientBrush_UsingGamma;
private System.Windows.Forms.MenuItem menuItem8;
private System.Windows.Forms.MenuItem Font_UsingFontInGDIPlus;
private System.Windows.Forms.MenuItem Font_EnumAllFonts;
private System.Windows.Forms.MenuItem menuItem9;
private System.Windows.Forms.MenuItem Font_EnhanceFontDialog;
private System.Windows.Forms.MenuItem Font_UsingTextRenderHint;
private System.Windows.Forms.MenuItem Font_Privatefontcollection;
private System.Windows.Forms.MenuItem Font_Privatefontcollection2;
private System.Windows.Forms.MenuItem Font_IsStyleAvailable;
private System.Windows.Forms.MenuItem Font_Size;
private System.Windows.Forms.MenuItem Font_BaseLine;
private System.Windows.Forms.MenuItem Font_DrawString;
private System.Windows.Forms.MenuItem Font_MeasureString;
private System.Windows.Forms.MenuItem Font_MeasureString2;
private System.Windows.Forms.MenuItem Font_ColumnTextOut;
private System.Windows.Forms.MenuItem Font_StirngTrimming;
private System.Windows.Forms.MenuItem Font_TextOutClip;
private System.Windows.Forms.MenuItem Font_MeasureCharacterRanges;
private System.Windows.Forms.MenuItem Font_TextoutDirection;
private System.Windows.Forms.MenuItem Font_TextAlignment;
private System.Windows.Forms.MenuItem Font_TextAlignment2;
private System.Windows.Forms.MenuItem Font_TextoutUsingTabs;
private System.Windows.Forms.MenuItem Font_UsingTabs;
private System.Windows.Forms.MenuItem Font_TextoutHotkeyPrefix;
private System.Windows.Forms.MenuItem Font_TextoutShadow;
private System.Windows.Forms.MenuItem Font_TextoutHashline;
private System.Windows.Forms.MenuItem Font_TextoutTexture;
private System.Windows.Forms.MenuItem Font_TextoutGradient;
private System.Windows.Forms.MenuItem Path_Construct;
private System.Windows.Forms.MenuItem Path_AddLines;
private System.Windows.Forms.MenuItem Path_CloseFigure;
private System.Windows.Forms.MenuItem Path_FillPath;
private System.Windows.Forms.MenuItem Path_AddSubPath;
private System.Windows.Forms.MenuItem Path_GetSubPath;
private System.Windows.Forms.MenuItem Path_GetPoints;
private System.Windows.Forms.MenuItem Path_PathData;
private System.Windows.Forms.MenuItem Path_ViewPointFLAG;
private System.Windows.Forms.MenuItem Path_SubPathRange;
private System.Windows.Forms.MenuItem Path_Flatten;
private System.Windows.Forms.MenuItem Path_Warp;
private System.Windows.Forms.MenuItem Path_Transform;
private System.Windows.Forms.MenuItem Path_Widen;
private System.Windows.Forms.MenuItem Path_WidenDemo;
private System.Windows.Forms.MenuItem Region_FromPath;
private System.Windows.Forms.MenuItem Region_Calculate;
private System.Windows.Forms.MenuItem Region_GetRects;
private System.Windows.Forms.MenuItem menuItem11;
private System.Windows.Forms.MenuItem Transform;
private System.Windows.Forms.MenuItem TranslateTransform;
private System.Windows.Forms.MenuItem RotateTransform;
private System.Windows.Forms.MenuItem DrawWatch;
private System.Windows.Forms.MenuItem ScaleTransform;
private System.Windows.Forms.MenuItem RectScale;
private System.Windows.Forms.MenuItem FontRotate;
private System.Windows.Forms.MenuItem Matrix_ListElements;
private System.Windows.Forms.MenuItem MatrixPos;
private System.Windows.Forms.MenuItem Martrix_Invert;
private System.Windows.Forms.MenuItem Matrix_Multiply;
private System.Windows.Forms.MenuItem Matrix_TransformPoints;
private System.Windows.Forms.MenuItem Matrix_TransformPoints2;
private System.Windows.Forms.MenuItem Matrix_TransformVectors;
private System.Windows.Forms.MenuItem Matrix_RotateAt;
private System.Windows.Forms.MenuItem Matrix_Shear;
private System.Windows.Forms.MenuItem Matrix_TextoutShear;
private System.Windows.Forms.MenuItem Matrix_ChangeFontHeight;
private System.Windows.Forms.MenuItem menuItem12;
private System.Windows.Forms.MenuItem ColorMatrix_Start;
private System.Windows.Forms.MenuItem TranslateColor;
private System.Windows.Forms.MenuItem ScaleColor;
private System.Windows.Forms.MenuItem RotateColor;
private System.Windows.Forms.MenuItem ColorShear;
private System.Windows.Forms.MenuItem ColorRemap;
private System.Windows.Forms.MenuItem SetRGBOutputChannel;
private System.Windows.Forms.MenuItem menuItem13;
private System.Windows.Forms.MenuItem Metafile;
private System.Windows.Forms.MenuItem CroppingAndScaling;
private System.Windows.Forms.MenuItem UsingInterpolationMode;
private System.Windows.Forms.MenuItem RotateFlip;
private System.Windows.Forms.MenuItem ImageSkewing;
private System.Windows.Forms.MenuItem Cubeimage;
private System.Windows.Forms.MenuItem ThumbnailImage;
private System.Windows.Forms.MenuItem Clone;
private System.Windows.Forms.MenuItem Picturescale;
private System.Windows.Forms.MenuItem menuItem15;
private System.Windows.Forms.MenuItem ImageAttributesSetNoOp;
private System.Windows.Forms.MenuItem SetColorMatrices;
private System.Windows.Forms.MenuItem SetOutputChannelColorProfile;
private System.Windows.Forms.MenuItem Gammaadjust;
private System.Windows.Forms.MenuItem SetOutputChannel;
private System.Windows.Forms.MenuItem Colorkey;
private System.Windows.Forms.MenuItem Setthreshold;
private System.Windows.Forms.MenuItem AdjustedPalette;
private System.Windows.Forms.MenuItem SetWrapMode;
private System.Windows.Forms.MenuItem menuItem16;
private System.Windows.Forms.MenuItem ListAllImageEncoders;
private System.Windows.Forms.MenuItem ListImageEncoder_Detail;
private System.Windows.Forms.MenuItem ListImageDecoder;
private System.Windows.Forms.MenuItem GetEncoderParameter;
private System.Windows.Forms.MenuItem GetAllEncoderParameter;
private System.Windows.Forms.MenuItem menuItem17;
private System.Windows.Forms.MenuItem MultipleFrameImage;
private System.Windows.Forms.MenuItem SaveBmp2tif;
private System.Windows.Forms.MenuItem SaveBMP2JPG;
private System.Windows.Forms.MenuItem TransformingJPEG;
private System.Windows.Forms.MenuItem GetImageFromMultyFrame;
private System.Windows.Forms.MenuItem QueryImage;
private System.Windows.Forms.MenuItem SetProp;
private System.Windows.Forms.MenuItem menuItem18;
private System.Windows.Forms.MenuItem OnCanvas;
private System.Windows.Forms.MenuItem OnWood;
private System.Windows.Forms.MenuItem Flashligt;
private System.Windows.Forms.MenuItem BlurAndSharpen;
//private AxThreed.AxSSRibbon axSSRibbon1;
// private AxThreed.AxSSFrame axSSFrame1;
/// private AxThreed.AxSSOption axSSOption1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.CreatePenFromBrush = new System.Windows.Forms.MenuItem();
this.DashStyle_Custom = new System.Windows.Forms.MenuItem();
this.Pen_Align = new System.Windows.Forms.MenuItem();
this.Pen_Tranform = new System.Windows.Forms.MenuItem();
this.Pen_LineCap = new System.Windows.Forms.MenuItem();
this.Pen_TransColor = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem5 = new System.Windows.Forms.MenuItem();
this.Brush_SolidBrush = new System.Windows.Forms.MenuItem();
this.Brush_FillVurve = new System.Windows.Forms.MenuItem();
this.menuItem10 = new System.Windows.Forms.MenuItem();
this.Brush_HatchBrush = new System.Windows.Forms.MenuItem();
this.Brush_EnumAllStyle = new System.Windows.Forms.MenuItem();
this.Brush_SetRenderingOrigin = new System.Windows.Forms.MenuItem();
this.menuItem7 = new System.Windows.Forms.MenuItem();
this.Brush_Texture = new System.Windows.Forms.MenuItem();
this.Brush_Texture_WrapMode = new System.Windows.Forms.MenuItem();
this.Brush_TextureTransform = new System.Windows.Forms.MenuItem();
this.Brush_GetTextureMatrix = new System.Windows.Forms.MenuItem();
this.menuItem6 = new System.Windows.Forms.MenuItem();
this.Brush_LinearGradientBrush = new System.Windows.Forms.MenuItem();
this.Brush_LinearArrange = new System.Windows.Forms.MenuItem();
this.Brush_LinearInterpolation = new System.Windows.Forms.MenuItem();
this.Brush_LinearGradientMode = new System.Windows.Forms.MenuItem();
this.Brush_LinearAngle = new System.Windows.Forms.MenuItem();
this.Brush_LinearCustomize = new System.Windows.Forms.MenuItem();
this.Brush_LinearGradientBrush_BellShape = new System.Windows.Forms.MenuItem();
this.Brsuh_LinearGradientBrush_UsingGamma = new System.Windows.Forms.MenuItem();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.Brush_PathGradientBrush_Star = new System.Windows.Forms.MenuItem();
this.Brush_PathGradientBrush_Star2 = new System.Windows.Forms.MenuItem();
this.Brush_Using_MorePathGradientBrush = new System.Windows.Forms.MenuItem();
this.Brush_PathGradientBrush_WrapMode = new System.Windows.Forms.MenuItem();
this.Brush_PathGradientBrush_CenterPoint = new System.Windows.Forms.MenuItem();
this.Brush_PathGradientBrush_InterpolationColors = new System.Windows.Forms.MenuItem();
this.Brsuh_PathGradietBrush_Focus = new System.Windows.Forms.MenuItem();
this.Brush_PathGradientBrush_Transform = new System.Windows.Forms.MenuItem();
this.menuItem8 = new System.Windows.Forms.MenuItem();
this.Font_UsingFontInGDIPlus = new System.Windows.Forms.MenuItem();
this.Font_EnumAllFonts = new System.Windows.Forms.MenuItem();
this.Font_EnhanceFontDialog = new System.Windows.Forms.MenuItem();
this.Font_UsingTextRenderHint = new System.Windows.Forms.MenuItem();
this.Font_Privatefontcollection = new System.Windows.Forms.MenuItem();
this.Font_Privatefontcollection2 = new System.Windows.Forms.MenuItem();
this.Font_IsStyleAvailable = new System.Windows.Forms.MenuItem();
this.Font_Size = new System.Windows.Forms.MenuItem();
this.Font_BaseLine = new System.Windows.Forms.MenuItem();
this.Font_DrawString = new System.Windows.Forms.MenuItem();
this.Font_MeasureString = new System.Windows.Forms.MenuItem();
this.Font_MeasureString2 = new System.Windows.Forms.MenuItem();
this.Font_ColumnTextOut = new System.Windows.Forms.MenuItem();
this.Font_StirngTrimming = new System.Windows.Forms.MenuItem();
this.Font_TextOutClip = new System.Windows.Forms.MenuItem();
this.Font_MeasureCharacterRanges = new System.Windows.Forms.MenuItem();
this.Font_TextoutDirection = new System.Windows.Forms.MenuItem();
this.Font_TextAlignment = new System.Windows.Forms.MenuItem();
this.Font_TextAlignment2 = new System.Windows.Forms.MenuItem();
this.Font_TextoutUsingTabs = new System.Windows.Forms.MenuItem();
this.Font_UsingTabs = new System.Windows.Forms.MenuItem();
this.Font_TextoutHotkeyPrefix = new System.Windows.Forms.MenuItem();
this.Font_TextoutShadow = new System.Windows.Forms.MenuItem();
this.Font_TextoutHashline = new System.Windows.Forms.MenuItem();
this.Font_TextoutTexture = new System.Windows.Forms.MenuItem();
this.Font_TextoutGradient = new System.Windows.Forms.MenuItem();
this.menuItem9 = new System.Windows.Forms.MenuItem();
this.Path_Construct = new System.Windows.Forms.MenuItem();
this.Path_AddLines = new System.Windows.Forms.MenuItem();
this.Path_CloseFigure = new System.Windows.Forms.MenuItem();
this.Path_FillPath = new System.Windows.Forms.MenuItem();
this.Path_AddSubPath = new System.Windows.Forms.MenuItem();
this.Path_GetSubPath = new System.Windows.Forms.MenuItem();
this.Path_GetPoints = new System.Windows.Forms.MenuItem();
this.Path_PathData = new System.Windows.Forms.MenuItem();
this.Path_ViewPointFLAG = new System.Windows.Forms.MenuItem();
this.Path_SubPathRange = new System.Windows.Forms.MenuItem();
this.Path_Flatten = new System.Windows.Forms.MenuItem();
this.Path_Warp = new System.Windows.Forms.MenuItem();
this.Path_Transform = new System.Windows.Forms.MenuItem();
this.Path_Widen = new System.Windows.Forms.MenuItem();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -