17 references to Allocate
System.Drawing.Common.Tests (17)
System\Drawing\BufferedGraphicsContextTests.cs (11)
23using BufferedGraphics bufferedGraphics = context.Allocate(graphics, Rectangle.Empty); 35using BufferedGraphics bufferedGraphics = context.Allocate(graphics, new Rectangle(0, 0, context.MaximumBuffer.Width - 1, context.MaximumBuffer.Height - 1)); 47using BufferedGraphics bufferedGraphics = context.Allocate(graphics, new Rectangle(0, 0, context.MaximumBuffer.Width + 1, context.MaximumBuffer.Height + 1)); 130using BufferedGraphics graphics = context.Allocate(null, Rectangle.Empty); 139Assert.Throws<ArgumentNullException>("hdc", () => context.Allocate(null, new Rectangle(0, 0, 10, 10))); 151AssertExtensions.Throws<ArgumentException>(null, () => context.Allocate(graphics, largeRectangle)); 152AssertExtensions.Throws<ArgumentException>(null, () => context.Allocate(graphics, Rectangle.Empty)); 166Assert.Throws<InvalidOperationException>(() => context.Allocate(graphics, largeRectangle)); 167Assert.Throws<InvalidOperationException>(() => context.Allocate(graphics, Rectangle.Empty)); 231using (context.Allocate(graphics, Rectangle.Empty)) 243using (context.Allocate(graphics, Rectangle.Empty))
System\Drawing\BufferedGraphicsTests.cs (6)
14BufferedGraphics graphics = context.Allocate(targetGraphics, new Rectangle(0, 0, 1, 1)); 29BufferedGraphics graphics = context.Allocate(targetGraphics, new Rectangle(0, 0, context.MaximumBuffer.Width + 1, context.MaximumBuffer.Height + 1)); 49using BufferedGraphics bufferedGraphics = context.Allocate(graphics, new Rectangle(0, 0, 3, 3)); 94using BufferedGraphics graphics = context.Allocate(originalGraphics, new Rectangle(0, 0, 3, 3)); 111using BufferedGraphics bufferedGraphics = context.Allocate(graphics, new Rectangle(0, 0, 1, 1)); 119using BufferedGraphics graphics = context.Allocate(null, Rectangle.Empty);