L
Lance
How do you enable
Graphics.InterpolationMode.NearestNeighbor? When I use
the following code it does not work (i.e., the image
appears to have been drawn using linear interpolation):
Const scale As Single = 10
Dim b As New Drawing.TextureBrush(MyBitmap)
Dim g As Drawing.Graphics = MyPictureBox.CreateGraphics
g.InterpolationMode = InterpolationMode.NearestNeighbor
b.ScaleTransform(scale, scale)
'I've also tried to scale g, but that doesn't work either
'i.e., g.ScaleTransform(scale, scale)
g.FillRectangle(b, MyPictureBox.ClientRectangle)
Thanks,
Lance
Graphics.InterpolationMode.NearestNeighbor? When I use
the following code it does not work (i.e., the image
appears to have been drawn using linear interpolation):
Const scale As Single = 10
Dim b As New Drawing.TextureBrush(MyBitmap)
Dim g As Drawing.Graphics = MyPictureBox.CreateGraphics
g.InterpolationMode = InterpolationMode.NearestNeighbor
b.ScaleTransform(scale, scale)
'I've also tried to scale g, but that doesn't work either
'i.e., g.ScaleTransform(scale, scale)
g.FillRectangle(b, MyPictureBox.ClientRectangle)
Thanks,
Lance