Here is an example:
public MainForm() { InitializeComponent(); LinearGradientBrush brush = new LinearGradientBrush(new Rectangle(0,0,100,100),Color.Blue, Color.White,angle:0); brush.WrapMode = WrapMode.Tile; // OK brush.WrapMode = WrapMode.Clamp; // Causes Unhandled exception alert, offering break }
In the VS2008 output window, this shows:
The first exception of type "System.ArgumentException" has appeared in System.Drawing.dll Additional information: The parameter is not valid.
(pic http://i.imgur.com/nM2oNm1.png )
This is on Windows 7.
The documentation is here https://msdn.microsoft.com/en-us/library/vstudio/system.drawing.drawing2d.lineargradientbrush.wrapmode(v=vs.90).aspx
confirms that LinearGradientBrush.WrapMode accepts WrapMode
"Gets or sets the WrapMode enumeration that indicates the wrapping mode for this LinearGradientBrush."
https://msdn.microsoft.com/en-us/library/vstudio/system.drawing.drawing2d.wrapmode(v=vs.90).aspx
, WrapMode.Clamp :
" ."
VS2015 Windows 8.1.
, Clamp .. , , .
Clamp
InterpolationColors, .
InterpolationColors
. espcially InterpolationColors
: Lars : LinearGradientBrush, TextureBrush..
LinearGradientBrush
TextureBrush
Source: https://habr.com/ru/post/1612338/More articles:Linking pages in Hugo / markdown - markdownWhy is the initializer_list parameter not automatically converted to an array? - c ++How can I unit test a class that uses SimpleJdbcCall - javaRun a block for each satisfied condition; otherwise, execute another block - iterationLaravel 5 Paginate + Infinite Scroll jQuery - javascript"while loop" внутри "for loop" в R не работает? - for-loopHow to fill the brush area of a linear gradient from the source area? - c #Determining memory and processor usage in docker caching - memoryКак выбрать и выделить UICollectionView, например, UITableViewCell? - iosSieve due to confusion with the introduction of Eratosthenes - pythonAll Articles