From 50d7e1b38f0422d2c07f38a9b93ec74fc1296f16 Mon Sep 17 00:00:00 2001 From: "Andy (Steve) De George" <67293991+adegeo@users.noreply.github.com> Date: Fri, 7 Jan 2022 09:46:45 -0800 Subject: [PATCH 1/3] Fix metadata blank lines (#1266) --- ...to-create-an-unbound-windows-forms-datagridview-control.md | 4 +--- ...-creating-an-unbound-windows-forms-datagridview-control.md | 4 +--- .../wpf/advanced/how-to-alter-the-typography-of-text.md | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/dotnet-desktop-guide/framework/winforms/controls/how-to-create-an-unbound-windows-forms-datagridview-control.md b/dotnet-desktop-guide/framework/winforms/controls/how-to-create-an-unbound-windows-forms-datagridview-control.md index d882157448..6a26db4710 100644 --- a/dotnet-desktop-guide/framework/winforms/controls/how-to-create-an-unbound-windows-forms-datagridview-control.md +++ b/dotnet-desktop-guide/framework/winforms/controls/how-to-create-an-unbound-windows-forms-datagridview-control.md @@ -1,8 +1,6 @@ --- 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" dev_langs: - "csharp" diff --git a/dotnet-desktop-guide/framework/winforms/controls/walkthrough-creating-an-unbound-windows-forms-datagridview-control.md b/dotnet-desktop-guide/framework/winforms/controls/walkthrough-creating-an-unbound-windows-forms-datagridview-control.md index 6b8c7cdf0d..0d9132b333 100644 --- a/dotnet-desktop-guide/framework/winforms/controls/walkthrough-creating-an-unbound-windows-forms-datagridview-control.md +++ b/dotnet-desktop-guide/framework/winforms/controls/walkthrough-creating-an-unbound-windows-forms-datagridview-control.md @@ -1,8 +1,6 @@ --- 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" dev_langs: - "csharp" diff --git a/dotnet-desktop-guide/framework/wpf/advanced/how-to-alter-the-typography-of-text.md b/dotnet-desktop-guide/framework/wpf/advanced/how-to-alter-the-typography-of-text.md index 25051f8326..ca9166cbee 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/how-to-alter-the-typography-of-text.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/how-to-alter-the-typography-of-text.md @@ -1,8 +1,6 @@ --- 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. - ms.date: "03/30/2017" dev_langs: - "csharp" From 97abdbc51c254978fca4bae724877d1450c88545 Mon Sep 17 00:00:00 2001 From: "Andy (Steve) De George" <67293991+adegeo@users.noreply.github.com> Date: Fri, 7 Jan 2022 13:34:04 -0800 Subject: [PATCH 2/3] Updated workflows with permission restrictions (#1267) * Updated workflows * Remove docs verifier for now --- .github/workflows/bcnotify.yaml | 19 ------------------- .github/workflows/build-validation.yml | 10 ++++++---- .../workflows/check-for-build-warnings.yml | 4 +++- .github/workflows/markdownlint.yml | 4 ++++ .github/workflows/version-sweep.yml | 6 +++++- 5 files changed, 18 insertions(+), 25 deletions(-) delete mode 100644 .github/workflows/bcnotify.yaml diff --git a/.github/workflows/bcnotify.yaml b/.github/workflows/bcnotify.yaml deleted file mode 100644 index 5ba1bb45ce..0000000000 --- a/.github/workflows/bcnotify.yaml +++ /dev/null @@ -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" diff --git a/.github/workflows/build-validation.yml b/.github/workflows/build-validation.yml index 2f168db92c..30a5afdfd2 100644 --- a/.github/workflows/build-validation.yml +++ b/.github/workflows/build-validation.yml @@ -2,10 +2,10 @@ name: 'Snippets 5000' # Controls when the action will run. Triggers the workflow on push or pull request +# events on the main branch only. on: pull_request: - paths: - branches: '*' + branches: [ main ] types: [opened, synchronize, reopened] env: @@ -15,10 +15,12 @@ env: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build snippets" - build-snippets: + # This workflow contains a single job called "snippets-build" + snippets-build: # The type of runner that the job will run on runs-on: windows-latest + permissions: + statuses: write # Steps represent a sequence of tasks that will be executed as part of the job steps: diff --git a/.github/workflows/check-for-build-warnings.yml b/.github/workflows/check-for-build-warnings.yml index 26eb1e2eec..9555067e07 100644 --- a/.github/workflows/check-for-build-warnings.yml +++ b/.github/workflows/check-for-build-warnings.yml @@ -1,4 +1,4 @@ -name: 'Status checker' +name: 'OPS status checker' on: pull_request_target: @@ -8,6 +8,8 @@ jobs: status_checker_job: name: Look for build warnings runs-on: ubuntu-latest + permissions: + statuses: write steps: - uses: dotnet/docs-actions/actions/status-checker@main with: diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml index 4dc5c1878a..35a8be4a99 100644 --- a/.github/workflows/markdownlint.yml +++ b/.github/workflows/markdownlint.yml @@ -2,6 +2,8 @@ name: Markdownlint on: push: + branches: + - main paths: - "**/*.md" - ".markdownlint.json" @@ -18,6 +20,8 @@ jobs: lint: runs-on: ubuntu-latest + permissions: + statuses: write steps: - uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 #@v2 diff --git a/.github/workflows/version-sweep.yml b/.github/workflows/version-sweep.yml index 16d251348b..b35789a04f 100644 --- a/.github/workflows/version-sweep.yml +++ b/.github/workflows/version-sweep.yml @@ -4,7 +4,7 @@ name: 'target supported version' # Controls when the action will run. 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: - cron: '0 0 1 * *' workflow_dispatch: @@ -20,6 +20,9 @@ jobs: version-sweep: # The type of runner that the job will run on 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: @@ -31,6 +34,7 @@ jobs: if: ${{ github.event_name == 'workflow_dispatch' }} run: | echo 'Reason: ${{ github.event.inputs.reason }}' + # Start the .NET version sweeper, scan projects/slns for non-LTS (or currrent) versions - name: .NET version sweeper id: dotnet-version-sweeper From 2b975023e85332511eb45c604f700f6a6fb19a01 Mon Sep 17 00:00:00 2001 From: Pooja Poojari <95325584+poojapoojari@users.noreply.github.com> Date: Sat, 8 Jan 2022 03:23:00 +0530 Subject: [PATCH 3/3] US-1889327: Fixed suggestions to matrix-representation-of-transformations.md and types-of-coordinate-systems.md file (#1265) * Fixed suggestions for US-1889327 * Updated alt texts for US-1889327 --- ...atrix-representation-of-transformations.md | 48 ++++++++++--------- .../advanced/types-of-coordinate-systems.md | 30 ++++++------ 2 files changed, 41 insertions(+), 37 deletions(-) diff --git a/dotnet-desktop-guide/framework/winforms/advanced/matrix-representation-of-transformations.md b/dotnet-desktop-guide/framework/winforms/advanced/matrix-representation-of-transformations.md index 74389935b4..914dc22cf2 100644 --- a/dotnet-desktop-guide/framework/winforms/advanced/matrix-representation-of-transformations.md +++ b/dotnet-desktop-guide/framework/winforms/advanced/matrix-representation-of-transformations.md @@ -1,6 +1,8 @@ --- 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: - "csharp" - "vb" @@ -19,13 +21,13 @@ ms.assetid: 0659fe00-9e0c-41c4-9118-016f2404c905 --- # 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. - - ![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. - ![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. Points in the plane and rows and columns of a matrix can be thought of as vectors. For example, (2, 5) is a vector with two components, and (3, 7, 1) is a vector with three components. The dot product of two vectors is defined as follows: @@ -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. - ![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). - ![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. - - ![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. - - ![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. - - ![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 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 object. The statement `Matrix myMatrix = new Matrix(0, 1, -1, 0, 3, 4)` constructs the matrix shown in the preceding figure. ## Composite Transformations 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 B|Scale by a factor of 2 in the x direction| |Matrix C|Translate 3 units in the y direction| @@ -80,8 +82,8 @@ An m×n matrix is a set of numbers arranged in m rows and n columns. The followi [2 1 1]D = [-2 5 1] 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 object. @@ -94,8 +96,8 @@ An m×n matrix is a set of numbers arranged in m rows and n columns. The followi [!code-vb[System.Drawing.CoordinateSystems#11](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.CoordinateSystems/VB/Class1.vb#11)] 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 diff --git a/dotnet-desktop-guide/framework/winforms/advanced/types-of-coordinate-systems.md b/dotnet-desktop-guide/framework/winforms/advanced/types-of-coordinate-systems.md index fa5d49c10b..1aacccbe01 100644 --- a/dotnet-desktop-guide/framework/winforms/advanced/types-of-coordinate-systems.md +++ b/dotnet-desktop-guide/framework/winforms/advanced/types-of-coordinate-systems.md @@ -1,6 +1,8 @@ --- 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 dev_langs: - "csharp" @@ -22,17 +24,17 @@ GDI+ uses three coordinate spaces: world, page, and device. World coordinates ar ## 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. - - ![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. - ![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: -||| -|-|-| +| Coordinate space | Endpoint coordinates | +|------------------|----------------------| |World|(0, 0) to (160, 80)| |Page|(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: -||| -|-|-| +| Coordinate space | Endpoint coordinates | +|------------------|----------------------| |World|(0, 0) to (2, 1)| |Page|(0, 0) to (2, 1)| |Device|(0, 0) to (192, 96)| @@ -78,13 +80,13 @@ GDI+ uses three coordinate spaces: world, page, and device. World coordinates ar [!code-vb[System.Drawing.CoordinateSystems#34](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.CoordinateSystems/VB/Class1.vb#34)] 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: -||| -|-|-| +|Coordinate space | Endpoint coordinates | +|-----------------|----------------------| |World|(0, 0) to (2, 1)| |Page|(2, 0.5) to (4, 1.5)| |Device|(192, 48) to (384, 144)|