215 references to GraphicsUnit
System.Drawing (117)
commonui\System\Drawing\Advanced\Font.cs (22)
46
GraphicsUnit
fontUnit;
94
GraphicsUnit
unit =
GraphicsUnit
.Point;
115
unit = (
GraphicsUnit
) sie.Value;
163
public Font(FontFamily family, float emSize, FontStyle style,
GraphicsUnit
unit) {
174
public Font(FontFamily family, float emSize, FontStyle style,
GraphicsUnit
unit, byte gdiCharSet) {
185
public Font(FontFamily family, float emSize, FontStyle style,
GraphicsUnit
unit, byte gdiCharSet, bool gdiVerticalFont) {
196
public Font(string familyName, float emSize, FontStyle style,
GraphicsUnit
unit, byte gdiCharSet) {
208
public Font(string familyName, float emSize, FontStyle style,
GraphicsUnit
unit, byte gdiCharSet, bool gdiVerticalFont) {
224
Initialize(family, emSize, style,
GraphicsUnit
.Point, SafeNativeMethods.DEFAULT_CHARSET, false);
234
public Font(FontFamily family, float emSize,
GraphicsUnit
unit) {
246
Initialize(family, emSize, FontStyle.Regular,
GraphicsUnit
.Point, SafeNativeMethods.DEFAULT_CHARSET, false);
256
public Font(string familyName, float emSize, FontStyle style,
GraphicsUnit
unit) {
271
Initialize(familyName, emSize, style,
GraphicsUnit
.Point, SafeNativeMethods.DEFAULT_CHARSET, IsVerticalName(familyName));
281
public Font(string familyName, float emSize,
GraphicsUnit
unit) {
293
Initialize(familyName, emSize, FontStyle.Regular,
GraphicsUnit
.Point, SafeNativeMethods.DEFAULT_CHARSET, IsVerticalName(familyName));
309
GraphicsUnit
unit =
GraphicsUnit
.Point;
345
private void Initialize(string familyName, float emSize, FontStyle style,
GraphicsUnit
unit, byte gdiCharSet, bool gdiVerticalFont)
358
private void Initialize(FontFamily family, float emSize, FontStyle style,
GraphicsUnit
unit, byte gdiCharSet, bool gdiVerticalFont)
996
if (Unit ==
GraphicsUnit
.Point)
1026
public
GraphicsUnit
Unit {
commonui\System\Drawing\Advanced\Gdiplus.cs (3)
1672
internal static extern int GdipGetImageBounds(HandleRef image, ref GPRECTF gprectf, out
GraphicsUnit
unit);
2979
internal static extern int GdipCreateFont(HandleRef fontFamily, float emSize, FontStyle style,
GraphicsUnit
unit, out IntPtr font);
3027
internal static extern int GdipGetFontUnit(HandleRef font, out
GraphicsUnit
unit);
commonui\System\Drawing\Advanced\MetafileFrameUnit.cs (5)
35
Pixel =
GraphicsUnit
.Pixel,
41
Point =
GraphicsUnit
.Point,
48
Inch =
GraphicsUnit
.Inch,
54
Document =
GraphicsUnit
.Document,
62
Millimeter =
GraphicsUnit
.Millimeter,
commonui\System\Drawing\Advanced\StringUnit.cs (7)
29
World =
GraphicsUnit
.World,
35
Display =
GraphicsUnit
.Display,
40
Pixel =
GraphicsUnit
.Pixel,
47
Point =
GraphicsUnit
.Point,
54
Inch =
GraphicsUnit
.Inch,
61
Document =
GraphicsUnit
.Document,
67
Millimeter =
GraphicsUnit
.Millimeter,
commonui\System\Drawing\Bitmap.cs (1)
596
GraphicsUnit
.Pixel, attributes, null, IntPtr.Zero);
commonui\System\Drawing\FontConverter.cs (20)
104
GraphicsUnit
units =
GraphicsUnit
.Point;
262
else if (font.Unit !=
GraphicsUnit
.Point) {
283
args[3] = font.Unit; types[3] = typeof(
GraphicsUnit
);
342
units =
GraphicsUnit
.Point;
368
units is
GraphicsUnit
&&
394
(
GraphicsUnit
) units,
417
private string GetGraphicsUnitText(
GraphicsUnit
units) {
491
private
GraphicsUnit
ParseGraphicsUnits(string units) {
515
internal
GraphicsUnit
unit;
518
new UnitName("world",
GraphicsUnit
.World), // made up
519
new UnitName("display",
GraphicsUnit
.Display), // made up
520
new UnitName("px",
GraphicsUnit
.Pixel),
521
new UnitName("pt",
GraphicsUnit
.Point),
522
new UnitName("in",
GraphicsUnit
.Inch),
523
new UnitName("doc",
GraphicsUnit
.Document), // made up
524
new UnitName("mm",
GraphicsUnit
.Millimeter),
528
internal UnitName(string name,
GraphicsUnit
unit) {
686
public FontUnitConverter() : base(typeof(
GraphicsUnit
)) {
695
filteredValues.Remove(
GraphicsUnit
.Display);
commonui\System\Drawing\Graphics.cs (46)
768
public
GraphicsUnit
PageUnit {
778
return(
GraphicsUnit
) unit;
782
if (!ClientUtils.IsEnumValid(value, unchecked((int)value), (int)
GraphicsUnit
.World, (int)
GraphicsUnit
.Millimeter))
784
throw new InvalidEnumArgumentException("value", unchecked((int)value), typeof(
GraphicsUnit
));
2901
DrawImage(image, rect, 0, 0, width, height,
GraphicsUnit
.Pixel);
2991
GraphicsUnit
srcUnit) {
3019
GraphicsUnit
srcUnit) {
3047
GraphicsUnit
srcUnit) {
3081
GraphicsUnit
srcUnit) {
3112
GraphicsUnit
srcUnit) {
3153
GraphicsUnit
srcUnit, ImageAttributes imageAttr) {
3160
GraphicsUnit
srcUnit, ImageAttributes imageAttr,
3168
GraphicsUnit
srcUnit, ImageAttributes imageAttr,
3211
public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect,
GraphicsUnit
srcUnit) {
3219
GraphicsUnit
srcUnit, ImageAttributes imageAttr) {
3226
GraphicsUnit
srcUnit, ImageAttributes imageAttr,
3234
GraphicsUnit
srcUnit, ImageAttributes imageAttr,
3278
float srcWidth, float srcHeight,
GraphicsUnit
srcUnit) {
3285
float srcWidth, float srcHeight,
GraphicsUnit
srcUnit,
3293
float srcWidth, float srcHeight,
GraphicsUnit
srcUnit,
3302
float srcWidth, float srcHeight,
GraphicsUnit
srcUnit, ImageAttributes imageAttrs,
3334
int srcWidth, int srcHeight,
GraphicsUnit
srcUnit) {
3341
int srcWidth, int srcHeight,
GraphicsUnit
srcUnit,
3349
int srcWidth, int srcHeight,
GraphicsUnit
srcUnit,
3357
int srcWidth, int srcHeight,
GraphicsUnit
srcUnit, ImageAttributes imageAttrs,
3623
RectangleF srcRect,
GraphicsUnit
srcUnit,
3631
RectangleF srcRect,
GraphicsUnit
srcUnit,
3640
RectangleF srcRect,
GraphicsUnit
unit,
3665
Rectangle srcRect,
GraphicsUnit
srcUnit,
3673
Rectangle srcRect,
GraphicsUnit
srcUnit,
3682
Rectangle srcRect,
GraphicsUnit
unit,
3708
RectangleF srcRect,
GraphicsUnit
srcUnit,
3716
RectangleF srcRect,
GraphicsUnit
srcUnit,
3725
RectangleF srcRect,
GraphicsUnit
unit,
3752
Rectangle srcRect,
GraphicsUnit
srcUnit,
3760
Rectangle srcRect,
GraphicsUnit
srcUnit,
3772
Rectangle srcRect,
GraphicsUnit
unit,
3801
RectangleF srcRect,
GraphicsUnit
srcUnit,
3812
RectangleF srcRect,
GraphicsUnit
srcUnit,
3824
RectangleF srcRect,
GraphicsUnit
unit,
3863
Rectangle srcRect,
GraphicsUnit
srcUnit,
3874
Rectangle srcRect,
GraphicsUnit
srcUnit,
3886
Rectangle srcRect,
GraphicsUnit
unit,
4470
public GraphicsContainer BeginContainer(RectangleF dstrect, RectangleF srcrect,
GraphicsUnit
unit) {
4536
public GraphicsContainer BeginContainer(Rectangle dstrect, Rectangle srcrect,
GraphicsUnit
unit) {
commonui\System\Drawing\Image.cs (1)
964
public RectangleF GetBounds(ref
GraphicsUnit
pageUnit) {
commonui\System\Drawing\Pen.cs (2)
80
(int)
GraphicsUnit
.World,
122
(int)
GraphicsUnit
.World,
commonui\System\Drawing\SystemFonts.cs (9)
59
} else if (captionFont.Unit !=
GraphicsUnit
.Point) {
101
} else if (smcaptionFont.Unit !=
GraphicsUnit
.Point) {
142
} else if (menuFont.Unit !=
GraphicsUnit
.Point) {
183
} else if (statusFont.Unit !=
GraphicsUnit
.Point) {
224
} else if (messageboxFont.Unit !=
GraphicsUnit
.Point) {
279
} else if (icontitleFont.Unit !=
GraphicsUnit
.Point) {
398
if (defaultFont.Unit !=
GraphicsUnit
.Point) {
436
} else if (dialogFont.Unit !=
GraphicsUnit
.Point) {
453
return new Font(font.FontFamily, font.SizeInPoints, font.Style,
GraphicsUnit
.Point, font.GdiCharSet, font.GdiVerticalFont);
misc\DpiHelper.cs (1)
473
graphics.DrawImage(logicalImage, destRect, sourceRect,
GraphicsUnit
.Pixel);
System.Web.DataVisualization (29)
Common\General\Axis.cs (9)
3681
GraphicsUnit
.Point);
3734
GraphicsUnit
.Point
3782
GraphicsUnit
.Point);
3915
GraphicsUnit
.Point);
3953
GraphicsUnit
.Point);
4767
GraphicsUnit
.Point);
4804
GraphicsUnit
.Point);
5117
GraphicsUnit
.Point);
5127
GraphicsUnit
.Point);
Common\General\Chart.cs (4)
4229
public Font GetFont(FontFamily family, float size, FontStyle style,
GraphicsUnit
unit)
4266
GraphicsUnit
_unit =
GraphicsUnit
.Point;
4311
public KeyInfo(FontFamily family, float size, FontStyle style,
GraphicsUnit
unit)
Common\General\ChartArea.cs (1)
2599
GraphicsUnit
.Point);
Common\General\ChartGraphics.cs (6)
750
GraphicsUnit
.Pixel,
758
GraphicsUnit
.Pixel,
2333
GraphicsUnit
.Pixel,
3599
GraphicsUnit
.Pixel,
4272
GraphicsUnit
.Pixel,
4570
GraphicsUnit
.Pixel,
Common\General\ChartRenderingEngine.cs (2)
167
GraphicsUnit
srcUnit,
389
GraphicsUnit
srcUnit,
Common\General\GdiGraphics.cs (2)
124
GraphicsUnit
srcUnit,
269
GraphicsUnit
srcUnit,
Common\General\IChartRenderingEngine.cs (2)
99
GraphicsUnit
srcUnit,
214
GraphicsUnit
srcUnit,
Common\General\LegendColumns.cs (2)
2198
GraphicsUnit
.Pixel,
2332
GraphicsUnit
.Pixel,
Common\Utilities\XmlSerializer.cs (1)
591
GraphicsUnit
.Point,
System.Windows.Forms (35)
misc\DpiHelper.cs (1)
473
graphics.DrawImage(logicalImage, destRect, sourceRect,
GraphicsUnit
.Pixel);
winforms\Managed\System\WinForms\AxHost.cs (5)
4924
if (font.Unit !=
GraphicsUnit
.Point)
4949
if (f.Unit !=
GraphicsUnit
.Point)
4950
f = new Font(f.Name, f.SizeInPoints, f.Style,
GraphicsUnit
.Point, f.GdiCharSet, f.GdiVerticalFont);
4969
if (font.Unit !=
GraphicsUnit
.Point)
5013
f = new Font(oleFont.Name, (float)oleFont.Size/(float)10000, style,
GraphicsUnit
.Point, (byte)oleFont.Charset);
winforms\Managed\System\WinForms\ControlPaint.cs (9)
504
partOfImageToDraw.Height,
GraphicsUnit
.Pixel);
513
partOfImageToDraw.Height,
GraphicsUnit
.Pixel);
519
g.DrawImage(backgroundImage, imageRectangle, 0, 0, backgroundImage.Width, backgroundImage.Height,
GraphicsUnit
.Pixel, imageAttrib);
1383
graphics.DrawImage(bitmap, new Rectangle(x, y, width, height), 0, 0, width, height,
GraphicsUnit
.Pixel, attrs, null, IntPtr.Zero);
1524
g.DrawImage(image, dest, 0, 0, image.Width, image.Height,
GraphicsUnit
.Pixel, attrs, null, IntPtr.Zero);
1537
GraphicsUnit
.Pixel, attributes, null, IntPtr.Zero);
1601
GraphicsUnit
.Pixel,
1611
GraphicsUnit
.Pixel,
2031
return new Font(font.FontFamily, font.SizeInPoints, font.Style,
GraphicsUnit
.Point, font.GdiCharSet, font.GdiVerticalFont);
winforms\Managed\System\WinForms\DataGridCaption.cs (1)
538
g.DrawImage(b, bounds, 0, 0, bounds.Width, bounds.Height,
GraphicsUnit
.Pixel, attr);
winforms\Managed\System\WinForms\DataGridParentRows.cs (1)
784
g.DrawImage(b, bmpRect, 0, 0, bmpRect.Width, bmpRect.Height,
GraphicsUnit
.Pixel, attr);
winforms\Managed\System\WinForms\DataGridRow.cs (1)
572
g.DrawImage(bmp, bmpRect, 0, 0, bmpRect.Width, bmpRect.Height,
GraphicsUnit
.Pixel, attr);
winforms\Managed\System\WinForms\DataGridViewCell.cs (1)
4316
graphics.DrawImage(bmp, iconBounds, 0, 0, iconsWidth, iconsHeight,
GraphicsUnit
.Pixel);
winforms\Managed\System\WinForms\DataGridViewColumnHeaderCell.cs (1)
867
g.DrawImage(bmFlipXPThemes, backgroundBounds, new Rectangle(bmFlipXPThemes.Width - backgroundBounds.Width, 0, backgroundBounds.Width, backgroundBounds.Height),
GraphicsUnit
.Pixel);
winforms\Managed\System\WinForms\DataGridViewImageCell.cs (1)
884
g.DrawImage(img, imgBounds, 0, 0, img.Width, img.Height,
GraphicsUnit
.Pixel, attr);
winforms\Managed\System\WinForms\DataGridViewRowHeaderCell.cs (2)
842
GraphicsUnit
.Pixel);
1143
g.DrawImage(bmp, bmpRect, 0, 0, iconsWidth, iconsHeight,
GraphicsUnit
.Pixel, attr);
winforms\Managed\System\WinForms\FontDialog.cs (2)
233
result = new Font(result.FontFamily, MinSize, result.Style,
GraphicsUnit
.Point);
235
result = new Font(result.FontFamily, MaxSize, result.Style,
GraphicsUnit
.Point);
winforms\Managed\System\WinForms\PaintEvent.cs (1)
135
graphics.PageUnit =
GraphicsUnit
.Pixel;
winforms\Managed\System\WinForms\RichTextBox.cs (1)
2310
return new Font(fontName, fontSize, style,
GraphicsUnit
.Point, cf.bCharSet);
winforms\Managed\System\WinForms\ToolStripHighContrastRenderer.cs (2)
379
g.DrawImage(image, imageRect, 0, 0, imageRect.Width, imageRect.Height,
GraphicsUnit
.Pixel, attrs);
382
g.DrawImage(image, imageRect, 0, 0, image.Width, image.Height,
GraphicsUnit
.Pixel, attrs);
winforms\Managed\System\WinForms\ToolStripManager.cs (2)
77
if (sysFont.Unit !=
GraphicsUnit
.Point) {
106
if (sysFont.Unit !=
GraphicsUnit
.Point) {
winforms\Managed\System\WinForms\ToolStripProfessionalRenderer.cs (1)
673
e.Graphics.DrawImage(image, imageRect, new Rectangle(Point.Empty, imageRect.Size),
GraphicsUnit
.Pixel);
winforms\Managed\System\WinForms\ToolStripRenderer.cs (3)
878
e.Graphics.DrawImage(image, imageRect, new Rectangle(Point.Empty,imageRect.Size),
GraphicsUnit
.Pixel);
908
imageRect.Height,
GraphicsUnit
.Pixel, e.ImageAttributes);
1085
GraphicsUnit
.Pixel,
System.Windows.Forms.DataVisualization (29)
Common\General\Axis.cs (9)
3681
GraphicsUnit
.Point);
3734
GraphicsUnit
.Point
3782
GraphicsUnit
.Point);
3915
GraphicsUnit
.Point);
3953
GraphicsUnit
.Point);
4767
GraphicsUnit
.Point);
4804
GraphicsUnit
.Point);
5117
GraphicsUnit
.Point);
5127
GraphicsUnit
.Point);
Common\General\Chart.cs (4)
4229
public Font GetFont(FontFamily family, float size, FontStyle style,
GraphicsUnit
unit)
4266
GraphicsUnit
_unit =
GraphicsUnit
.Point;
4311
public KeyInfo(FontFamily family, float size, FontStyle style,
GraphicsUnit
unit)
Common\General\ChartArea.cs (1)
2599
GraphicsUnit
.Point);
Common\General\ChartGraphics.cs (6)
750
GraphicsUnit
.Pixel,
758
GraphicsUnit
.Pixel,
2333
GraphicsUnit
.Pixel,
3599
GraphicsUnit
.Pixel,
4272
GraphicsUnit
.Pixel,
4570
GraphicsUnit
.Pixel,
Common\General\ChartRenderingEngine.cs (2)
167
GraphicsUnit
srcUnit,
389
GraphicsUnit
srcUnit,
Common\General\GdiGraphics.cs (2)
124
GraphicsUnit
srcUnit,
269
GraphicsUnit
srcUnit,
Common\General\LegendColumns.cs (2)
2198
GraphicsUnit
.Pixel,
2332
GraphicsUnit
.Pixel,
Common\Utilities\XmlSerializer.cs (1)
591
GraphicsUnit
.Point,
WinForm\Utilities\Printing.cs (2)
252
if (ev.Graphics.PageUnit !=
GraphicsUnit
.Pixel)
254
ev.Graphics.PageUnit =
GraphicsUnit
.Pixel;
System.Workflow.ComponentModel (5)
AuthoringOM\Design\DesignerHelpers.cs (1)
193
graphics.DrawImage(image, imageRectangle, source.X, source.Y, source.Width, source.Height,
GraphicsUnit
.Pixel, imageAttributes);
AuthoringOM\Design\DesignerWidgets.cs (3)
1257
graphics.DrawImage(this.enabledItems[i].Image, new Rectangle(imagePoint, imageSize), new Rectangle(Point.Empty, imageSize),
GraphicsUnit
.Pixel);
1702
Font = new Font(Font.FontFamily, this.reqTabItemSize * 2 / 3,
GraphicsUnit
.Pixel);
3470
graphics.DrawImage(previewedActivityImage, destnRectangle, new Rectangle(Point.Empty, previewedActivityImage.Size),
GraphicsUnit
.Pixel);
AuthoringOM\Design\WorkflowView.cs (1)
1668
viewPortGraphics.DrawImage(temporaryBitmap, new Rectangle(-viewPortData.ShadowDepth.Width, -viewPortData.ShadowDepth.Height, memoryBitmap.Width, memoryBitmap.Height), 0, 0, memoryBitmap.Width, memoryBitmap.Height,
GraphicsUnit
.Pixel, transparentColorKey);