merge main branch

This commit is contained in:
CXWTool Service Account
2022-01-08 06:01:42 +00:00
10 changed files with 61 additions and 70 deletions
-19
View File
@@ -1,19 +0,0 @@
name: "bc-notification"
on:
issues:
types: [edited, labeled]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 #@v2
- uses: timheuer/issue-notifier@84b8e0081c0abce88ac2673f1f3ad8529a040586 #@v1.0.2
env:
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API }}
with:
fromMailAddress: '${{ secrets.BC_NOTIFY }}'
toMailAddress: '${{ secrets.BC_NOTIFY }}'
subject: 'BC:'
subjectPrefix: 'BC:'
labelsToMonitor: "breaking-change"
+6 -4
View File
@@ -2,10 +2,10 @@
name: 'Snippets 5000' name: 'Snippets 5000'
# Controls when the action will run. Triggers the workflow on push or pull request # Controls when the action will run. Triggers the workflow on push or pull request
# events on the main branch only.
on: on:
pull_request: pull_request:
paths: branches: [ main ]
branches: '*'
types: [opened, synchronize, reopened] types: [opened, synchronize, reopened]
env: env:
@@ -15,10 +15,12 @@ env:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel # A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs: jobs:
# This workflow contains a single job called "build snippets" # This workflow contains a single job called "snippets-build"
build-snippets: snippets-build:
# The type of runner that the job will run on # The type of runner that the job will run on
runs-on: windows-latest runs-on: windows-latest
permissions:
statuses: write
# Steps represent a sequence of tasks that will be executed as part of the job # Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
@@ -1,4 +1,4 @@
name: 'Status checker' name: 'OPS status checker'
on: on:
pull_request_target: pull_request_target:
@@ -8,6 +8,8 @@ jobs:
status_checker_job: status_checker_job:
name: Look for build warnings name: Look for build warnings
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
statuses: write
steps: steps:
- uses: dotnet/docs-actions/actions/status-checker@main - uses: dotnet/docs-actions/actions/status-checker@main
with: with:
+4
View File
@@ -2,6 +2,8 @@ name: Markdownlint
on: on:
push: push:
branches:
- main
paths: paths:
- "**/*.md" - "**/*.md"
- ".markdownlint.json" - ".markdownlint.json"
@@ -18,6 +20,8 @@ jobs:
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
statuses: write
steps: steps:
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 #@v2 - uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 #@v2
+5 -1
View File
@@ -4,7 +4,7 @@ name: 'target supported version'
# Controls when the action will run. # Controls when the action will run.
on: on:
# Triggers the workflow on push or pull request event based on a schedule # Triggers the workflow on push or pull request events but only for the default branch
schedule: schedule:
- cron: '0 0 1 * *' - cron: '0 0 1 * *'
workflow_dispatch: workflow_dispatch:
@@ -20,6 +20,9 @@ jobs:
version-sweep: version-sweep:
# The type of runner that the job will run on # The type of runner that the job will run on
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
# Steps represent a sequence of tasks that will be executed as part of the job # Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
@@ -31,6 +34,7 @@ jobs:
if: ${{ github.event_name == 'workflow_dispatch' }} if: ${{ github.event_name == 'workflow_dispatch' }}
run: | run: |
echo 'Reason: ${{ github.event.inputs.reason }}' echo 'Reason: ${{ github.event.inputs.reason }}'
# Start the .NET version sweeper, scan projects/slns for non-LTS (or currrent) versions # Start the .NET version sweeper, scan projects/slns for non-LTS (or currrent) versions
- name: .NET version sweeper - name: .NET version sweeper
id: dotnet-version-sweeper id: dotnet-version-sweeper
@@ -1,6 +1,8 @@
--- ---
title: "Matrix Representation of Transformations" title: "Matrix Representation of Transformations"
ms.date: "03/30/2017" description: Learn about matrix representation of linear and composite transformations.
ms.date: "01/06/2022"
ms.custom: devdivchpfy22
dev_langs: dev_langs:
- "csharp" - "csharp"
- "vb" - "vb"
@@ -20,11 +22,11 @@ ms.assetid: 0659fe00-9e0c-41c4-9118-016f2404c905
# Matrix Representation of Transformations # Matrix Representation of Transformations
An m×n matrix is a set of numbers arranged in m rows and n columns. The following illustration shows several matrices. An m×n matrix is a set of numbers arranged in m rows and n columns. The following illustration shows several matrices.
![Transformations](./media/aboutgdip05-art04.gif "AboutGdip05_art04") :::image type="content" source="media/aboutgdip05-art04.gif" alt-text="Illustration of matrices.":::
You can add two matrices of the same size by adding individual elements. The following illustration shows two examples of matrix addition. You can add two matrices of the same size by adding individual elements. The following illustration shows two examples of matrix addition.
![Transformations](./media/aboutgdip05-art05.gif "AboutGdip05_art05") :::image type="content" source="media/aboutgdip05-art05.gif" alt-text="Illustration of matrix addition.":::
An m×n matrix can be multiplied by an n×p matrix, and the result is an m×p matrix. The number of columns in the first matrix must be the same as the number of rows in the second matrix. For example, a 4×2 matrix can be multiplied by a 2×3 matrix to produce a 4×3 matrix. An m×n matrix can be multiplied by an n×p matrix, and the result is an m×p matrix. The number of columns in the first matrix must be the same as the number of rows in the second matrix. For example, a 4×2 matrix can be multiplied by a 2×3 matrix to produce a 4×3 matrix.
@@ -42,31 +44,31 @@ An m×n matrix is a set of numbers arranged in m rows and n columns. The followi
The following illustration shows several examples of matrix multiplication. The following illustration shows several examples of matrix multiplication.
![Transformations](./media/aboutgdip05-art06.gif "AboutGdip05_art06") :::image type="content" source="media/aboutgdip05-art06.gif" alt-text="Illustration of matrix multiplication.":::
If you think of a point in a plane as a 1×2 matrix, you can transform that point by multiplying it by a 2×2 matrix. The following illustration shows several transformations applied to the point (2, 1). If you think of a point in a plane as a 1×2 matrix, you can transform that point by multiplying it by a 2×2 matrix. The following illustration shows several transformations applied to the point (2, 1).
![Transformations](./media/aboutgdip05-art07.gif "AboutGdip05_art07") :::image type="content" source="media/aboutgdip05-art07.gif" alt-text="Matrix transformation to a point in a plane.":::
All of the transformations shown in the preceding figure are linear transformations. Certain other transformations, such as translation, are not linear, and cannot be expressed as multiplication by a 2×2 matrix. Suppose you want to start with the point (2, 1), rotate it 90 degrees, translate it 3 units in the x direction, and translate it 4 units in the y direction. You can accomplish this by using a matrix multiplication followed by a matrix addition. All of the transformations shown in the preceding figure are linear transformations. Certain other transformations, such as translation, are not linear, and cannot be expressed as multiplication by a 2×2 matrix. Suppose you want to start with the point (2, 1), rotate it 90 degrees, translate it 3 units in the x direction, and translate it 4 units in the y direction. You can accomplish this by using a matrix multiplication followed by a matrix addition.
![Transformations](./media/aboutgdip05-art08.gif "AboutGdip05_art08") :::image type="content" source="media/aboutgdip05-art08.gif" alt-text="Illustration of matrix multiplication followed by a matrix addition.":::
A linear transformation (multiplication by a 2×2 matrix) followed by a translation (addition of a 1×2 matrix) is called an affine transformation. An alternative to storing an affine transformation in a pair of matrices (one for the linear part and one for the translation) is to store the entire transformation in a 3×3 matrix. To make this work, a point in the plane must be stored in a 1×3 matrix with a dummy 3rd coordinate. The usual technique is to make all 3rd coordinates equal to 1. For example, the point (2, 1) is represented by the matrix [2 1 1]. The following illustration shows an affine transformation (rotate 90 degrees; translate 3 units in the x direction, 4 units in the y direction) expressed as multiplication by a single 3×3 matrix. A linear transformation (multiplication by a 2×2 matrix) followed by a translation (addition of a 1×2 matrix) is called an affine transformation. An alternative to storing an affine transformation in a pair of matrices (one for the linear part and one for the translation) is to store the entire transformation in a 3×3 matrix. To make this work, a point in the plane must be stored in a 1×3 matrix with a dummy 3rd coordinate. The usual technique is to make all 3rd coordinates equal to 1. For example, the point (2, 1) is represented by the matrix [2 1 1]. The following illustration shows an affine transformation (rotate 90 degrees; translate 3 units in the x direction, 4 units in the y direction) expressed as multiplication by a single 3×3 matrix.
![Transformations](./media/aboutgdip05-art09.gif "AboutGdip05_art09") :::image type="content" source="media/aboutgdip05-art09.gif" alt-text="Illustration of an affine transformation.":::
In the preceding example, the point (2, 1) is mapped to the point (2, 6). Note that the third column of the 3×3 matrix contains the numbers 0, 0, 1. This will always be the case for the 3×3 matrix of an affine transformation. The important numbers are the six numbers in columns 1 and 2. The upper-left 2×2 portion of the matrix represents the linear part of the transformation, and the first two entries in the 3rd row represent the translation. In the preceding example, the point (2, 1) is mapped to the point (2, 6). Note that the third column of the 3×3 matrix contains the numbers 0, 0, 1. This will always be the case for the 3×3 matrix of an affine transformation. The important numbers are the six numbers in columns 1 and 2. The upper-left 2×2 portion of the matrix represents the linear part of the transformation, and the first two entries in the 3rd row represent the translation.
![Transformations](./media/aboutgdip05-art10.gif "AboutGdip05_art10") :::image type="content" source="media/aboutgdip05-art10.gif" alt-text="Illustration of linear and translation part of a matrix transformation.":::
In GDI+ you can store an affine transformation in a <xref:System.Drawing.Drawing2D.Matrix> object. Because the third column of a matrix that represents an affine transformation is always (0, 0, 1), you specify only the six numbers in the first two columns when you construct a <xref:System.Drawing.Drawing2D.Matrix> object. The statement `Matrix myMatrix = new Matrix(0, 1, -1, 0, 3, 4)` constructs the matrix shown in the preceding figure. In GDI+ you can store an affine transformation in a <xref:System.Drawing.Drawing2D.Matrix> object. Because the third column of a matrix that represents an affine transformation is always (0, 0, 1), you specify only the six numbers in the first two columns when you construct a <xref:System.Drawing.Drawing2D.Matrix> object. The statement `Matrix myMatrix = new Matrix(0, 1, -1, 0, 3, 4)` constructs the matrix shown in the preceding figure.
## Composite Transformations ## Composite Transformations
A composite transformation is a sequence of transformations, one followed by the other. Consider the matrices and transformations in the following list: A composite transformation is a sequence of transformations, one followed by the other. Consider the matrices and transformations in the following list:
||| | Matrix | Transformation |
|-|-| |----------|----------------|
|Matrix A|Rotate 90 degrees| |Matrix A|Rotate 90 degrees|
|Matrix B|Scale by a factor of 2 in the x direction| |Matrix B|Scale by a factor of 2 in the x direction|
|Matrix C|Translate 3 units in the y direction| |Matrix C|Translate 3 units in the y direction|
@@ -81,7 +83,7 @@ An m×n matrix is a set of numbers arranged in m rows and n columns. The followi
The following illustration shows the matrices A, B, C, and D. The following illustration shows the matrices A, B, C, and D.
![Transformations](./media/aboutgdip05-art12.gif "AboutGdip05_art12") :::image type="content" source="media/aboutgdip05-art12.gif" alt-text="Illustration of matrix A, B, C, and D.":::
The fact that the matrix of a composite transformation can be formed by multiplying the individual transformation matrices means that any sequence of affine transformations can be stored in a single <xref:System.Drawing.Drawing2D.Matrix> object. The fact that the matrix of a composite transformation can be formed by multiplying the individual transformation matrices means that any sequence of affine transformations can be stored in a single <xref:System.Drawing.Drawing2D.Matrix> object.
@@ -95,7 +97,7 @@ An m×n matrix is a set of numbers arranged in m rows and n columns. The followi
The following illustration shows the matrix. The following illustration shows the matrix.
![Transformations](./media/aboutgdip05-art13.gif "AboutGdip05_art13") :::image type="content" source="media/aboutgdip05-art13.gif" alt-text="Matrix illustration of a composite transformation.":::
## See also ## See also
@@ -1,6 +1,8 @@
--- ---
title: "Types of Coordinate Systems" title: "Types of Coordinate Systems"
ms.date: "03/30/2017" description: Learn about transformations and coordinate systems, including world, page, and device.
ms.date: "01/06/2022"
ms.custom: devdivchpfy22
ms.topic: overview ms.topic: overview
dev_langs: dev_langs:
- "csharp" - "csharp"
@@ -23,16 +25,16 @@ GDI+ uses three coordinate spaces: world, page, and device. World coordinates ar
## Transforms and Coordinate Systems ## Transforms and Coordinate Systems
Suppose you want to work with a coordinate system that has its origin in the body of the client area rather than the upper-left corner. Say, for example, that you want the origin to be 100 pixels from the left edge of the client area and 50 pixels from the top of the client area. The following illustration shows such a coordinate system. Suppose you want to work with a coordinate system that has its origin in the body of the client area rather than the upper-left corner. Say, for example, that you want the origin to be 100 pixels from the left edge of the client area and 50 pixels from the top of the client area. The following illustration shows such a coordinate system.
![Coordinate System](./media/aboutgdip05-art01.gif "AboutGdip05_art01") :::image type="content" source="media/aboutgdip05-art01.gif" alt-text="Illustration of a coordinate system.":::
When you make the call `myGraphics.DrawLine(myPen, 0, 0, 160, 80)`, you get the line shown in the following illustration. When you make the call `myGraphics.DrawLine(myPen, 0, 0, 160, 80)`, you get the line shown in the following illustration.
![Coordinate System](./media/aboutgdip05-art02.gif "AboutGdip05_art02") :::image type="content" source="media/aboutgdip05-art02.gif" alt-text="Illustration of a line in the coordinate system.":::
The coordinates of the endpoints of your line in the three coordinate spaces are as follows: The coordinates of the endpoints of your line in the three coordinate spaces are as follows:
||| | Coordinate space | Endpoint coordinates |
|-|-| |------------------|----------------------|
|World|(0, 0) to (160, 80)| |World|(0, 0) to (160, 80)|
|Page|(100, 50) to (260, 130)| |Page|(100, 50) to (260, 130)|
|Device|(100, 50) to (260, 130)| |Device|(100, 50) to (260, 130)|
@@ -64,8 +66,8 @@ GDI+ uses three coordinate spaces: world, page, and device. World coordinates ar
If we assume that the display device has 96 dots per inch in the horizontal direction and 96 dots per inch in the vertical direction, the endpoints of the line in the preceding example have the following coordinates in the three coordinate spaces: If we assume that the display device has 96 dots per inch in the horizontal direction and 96 dots per inch in the vertical direction, the endpoints of the line in the preceding example have the following coordinates in the three coordinate spaces:
||| | Coordinate space | Endpoint coordinates |
|-|-| |------------------|----------------------|
|World|(0, 0) to (2, 1)| |World|(0, 0) to (2, 1)|
|Page|(0, 0) to (2, 1)| |Page|(0, 0) to (2, 1)|
|Device|(0, 0) to (192, 96)| |Device|(0, 0) to (192, 96)|
@@ -79,12 +81,12 @@ GDI+ uses three coordinate spaces: world, page, and device. World coordinates ar
The following illustration shows the line and coordinate system. The following illustration shows the line and coordinate system.
![Coordinate System](./media/aboutgdip05-art03.gif "AboutGdip05_art03") :::image type="content" source="media/aboutgdip05-art03.gif" alt-text="Illustration of a line and coordinate system.":::
If we assume that the display device has 96 dots per inch in the horizontal direction and 96 dots per inch in the vertical direction, the endpoints of the line in the preceding example have the following coordinates in the three coordinate spaces: If we assume that the display device has 96 dots per inch in the horizontal direction and 96 dots per inch in the vertical direction, the endpoints of the line in the preceding example have the following coordinates in the three coordinate spaces:
||| |Coordinate space | Endpoint coordinates |
|-|-| |-----------------|----------------------|
|World|(0, 0) to (2, 1)| |World|(0, 0) to (2, 1)|
|Page|(2, 0.5) to (4, 1.5)| |Page|(2, 0.5) to (4, 1.5)|
|Device|(192, 48) to (384, 144)| |Device|(192, 48) to (384, 144)|
@@ -1,8 +1,6 @@
--- ---
title: How to Create an Unbound Windows Forms DataGridView Control title: How to Create an Unbound Windows Forms DataGridView Control
description: Populate an unbound Windows Forms DataGridView Control programmatically and display a small amount of data in a table format without binding it to a data source.
description: Populate an unbound Windows Forms DataGridView Control programmatically and display a small amount of data in a table format without binding it to a data source
ms.date: "03/30/2017" ms.date: "03/30/2017"
dev_langs: dev_langs:
- "csharp" - "csharp"
@@ -1,8 +1,6 @@
--- ---
title: Walkthrough to Creating an Unbound Windows Forms DataGridView Control title: Walkthrough to Creating an Unbound Windows Forms DataGridView Control
description: You can create an Unbound Windows Forms DataGridView Control and display a small amount of data without binding it to a data source.
description: You can create an Unbound Windows Forms DataGridView Control and display a small amount of data without binding it to a data source
ms.date: "03/30/2017" ms.date: "03/30/2017"
dev_langs: dev_langs:
- "csharp" - "csharp"
@@ -1,8 +1,6 @@
--- ---
title: How to Alter the Typography of Text title: How to Alter the Typography of Text
description: To alter the telegraphy of text, set the telegraphy attribute. You can set the typographic property of text programmatically. You can see how altered and default telegraphy properties of text render on screen each with an example. description: To alter the telegraphy of text, set the telegraphy attribute. You can set the typographic property of text programmatically. You can see how altered and default telegraphy properties of text render on screen each with an example.
ms.date: "03/30/2017" ms.date: "03/30/2017"
dev_langs: dev_langs:
- "csharp" - "csharp"