我有以下代码根据numericalUpDown
控件中给出的值绘制部分图像:
'Creates a new Bitmap from an existing image
Dim cards As New Bitmap(My.Resources.bar)
' Draws the rectangle
Dim srcRect As New Rectangle(0, 0, 22, NumericUpDown1.Value)
' Clones the partial image from the original image
Dim card As Bitmap = DirectCast(cards.Clone(srcRect, cards.PixelFormat), Bitmap)
'Locates the new image into the picturebox
PictureBox1.Image = card
它从上到下开始绘画,但我想从下到上开始显示图像部分。
有什么想法吗?