扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:coffer编译 来源:VCKBASE 2007年11月16日
关键字:
![]() 图四、位图效果图 |
public: TextureBrush(Image *bitmap); |
private: System::Void Form1_Paint(System::Object * sender, System::Windows::Forms::PaintEventArgs * e) { Bitmap *bmpPapers = new Bitmap(S"Papers.bmp"); TextureBrush *brushPapers = new TextureBrush(bmpPapers); e->Graphics->FillRectangle(brushPapers, 5, 5, 430, 280); } |
![]() 图五、代码运行效果图 |
public: TextureBrush(Image *bitmap, Rectangle destination); |
public: TextureBrush(Image *bitmap, RectangleF destination); |
private: System::Void Form1_Paint(System::Object * sender, System::Windows::Forms::PaintEventArgs * e) { Bitmap *bmpPapers = new Bitmap(S"Papers.bmp"); TextureBrush *brushPapers = new TextureBrush(bmpPapers, new Rectangle(0, 0, 40, 42)); e->Graphics->FillRectangle(brushPapers, 5, 5, 438, 290); } |
![]() 图六、代码运行效果图 |
public: TextureBrush(Image *bitmap, WrapMode wrapMode); public: TextureBrush(Image *bitmap, WrapMode wrapMode, Rectangle destination); public: TextureBrush(Image *bitmap, WrapMode wrapMode, RectangleF destination); |
private: System::Void Form1_Paint(System::Object * sender, System::Windows::Forms::PaintEventArgs * e) { Bitmap *bmpPapers = new Bitmap(S"Papers.bmp"); TextureBrush *brushPapers = new TextureBrush(bmpPapers, WrapMode::Clamp); e->Graphics->FillRectangle(brushPapers, 5, 5, 438, 290); } |
![]() 图七、Clamp方式效果图 |
private: System::Void Form1_Paint(System::Object * sender, System::Windows::Forms::PaintEventArgs * e) { Bitmap *bmpPapers = new Bitmap(S"Papers.bmp"); TextureBrush *brushPapers = new TextureBrush(bmpPapers, WrapMode::Tile, Rectangle(0, 0, 40, 42)); e->Graphics->FillRectangle(brushPapers, 5, 5, 438, 290); } |
![]() 图八、Tile方式效果图 |
private: System::Void Form1_Paint(System::Object * sender, System::Windows::Forms::PaintEventArgs * e) { Bitmap *bmpPapers = new Bitmap(S"Papers.bmp"); TextureBrush *brushPapers = new TextureBrush(bmpPapers, WrapMode::TileFlipX); e->Graphics->FillRectangle(brushPapers, 5, 5, 430, 290); } |
![]() 图九、TileFlipX方式效果图 |
private: System::Void Form1_Paint(System::Object * sender, System::Windows::Forms::PaintEventArgs * e) { Bitmap *bmpPapers = new Bitmap(S"Papers.bmp"); TextureBrush *brushPapers = new TextureBrush(bmpPapers, WrapMode.TileFlipXY, Rectangle(0, 0, 42, 42)); e->Graphics->FillRectangle(brushPapers, 5, 5, 412, 244); } |
![]() 图十、TileFlipXY方式效果图 |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。