LinearGradientBrush.MultiplyTransform Metoda
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Vynásobí hodnotu Matrix , která představuje místní geometrickou transformaci, LinearGradientBrush o hodnotu určenou Matrix předponou zadaného Matrixobjektu .
Přetížení
MultiplyTransform(Matrix, MatrixOrder) |
Vynásobí hodnotu Matrix , která představuje místní geometrické transformace, LinearGradientBrush o hodnotu zadanou Matrix v zadaném pořadí. |
MultiplyTransform(Matrix) |
Vynásobí hodnotu Matrix , která představuje místní geometrickou transformaci, LinearGradientBrush o hodnotu určenou Matrix předponou zadaného Matrixobjektu . |
MultiplyTransform(Matrix, MatrixOrder)
- Zdroj:
- LinearGradientBrush.cs
- Zdroj:
- LinearGradientBrush.cs
- Zdroj:
- LinearGradientBrush.cs
Vynásobí hodnotu Matrix , která představuje místní geometrické transformace, LinearGradientBrush o hodnotu zadanou Matrix v zadaném pořadí.
public:
void MultiplyTransform(System::Drawing::Drawing2D::Matrix ^ matrix, System::Drawing::Drawing2D::MatrixOrder order);
public void MultiplyTransform (System.Drawing.Drawing2D.Matrix matrix, System.Drawing.Drawing2D.MatrixOrder order);
member this.MultiplyTransform : System.Drawing.Drawing2D.Matrix * System.Drawing.Drawing2D.MatrixOrder -> unit
Public Sub MultiplyTransform (matrix As Matrix, order As MatrixOrder)
Parametry
- order
- MatrixOrder
Určuje MatrixOrder pořadí, ve kterém se mají tyto dvě matice vynásobit.
Příklady
Následující příklad kódu je navržený pro použití s model Windows Forms a vyžaduje PaintEventArgse
objekt OnPaint události . Kód provede následující akce:
Vytvoří nový objekt LinearGradientBrush.
Pomocí tohoto štětce nakreslí na obrazovku tři tečky.
Zavolá metodu MultiplyTransform , která transformuje LinearGradientBrush.
Pomocí transformovaného štětce nakreslí na obrazovku elipsu přímo pod první elipsu.
Všimněte si, že dolní elipsa je roztažena vodorovným směrem a že přechod je roztažený tak, aby odpovídal novému obrazci.
private:
void MultiplyTransformExample( PaintEventArgs^ e )
{
// Create a LinearGradientBrush.
Rectangle myRect = Rectangle(20,20,200,100);
LinearGradientBrush^ myLGBrush = gcnew LinearGradientBrush( myRect,Color::Blue,Color::Red,0.0f,true );
// Draw an ellipse to the screen using the LinearGradientBrush.
e->Graphics->FillEllipse( myLGBrush, myRect );
// Transform the LinearGradientBrush.
array<Point>^ transformArray = {Point(20,150),Point(400,150),Point(20,200)};
Matrix^ myMatrix = gcnew Matrix( myRect,transformArray );
myLGBrush->MultiplyTransform( myMatrix, MatrixOrder::Prepend );
// Draw a second ellipse to the screen using
// the transformed brush.
e->Graphics->FillEllipse( myLGBrush, 20, 150, 380, 50 );
}
private void MultiplyTransformExample(PaintEventArgs e)
{
// Create a LinearGradientBrush.
Rectangle myRect = new Rectangle(20, 20, 200, 100);
LinearGradientBrush myLGBrush = new LinearGradientBrush(
myRect, Color.Blue, Color.Red, 0.0f, true);
// Draw an ellipse to the screen using the LinearGradientBrush.
e.Graphics.FillEllipse(myLGBrush, myRect);
// Transform the LinearGradientBrush.
Point[] transformArray = { new Point(20, 150),
new Point(400,150), new Point(20, 200) };
Matrix myMatrix = new Matrix(myRect, transformArray);
myLGBrush.MultiplyTransform(
myMatrix,
MatrixOrder.Prepend);
// Draw a second ellipse to the screen using
// the transformed brush.
e.Graphics.FillEllipse(myLGBrush, 20, 150, 380, 50);
}
Public Sub MultiplyTransformExample(ByVal e As PaintEventArgs)
' Create a LinearGradientBrush.
Dim myRect As New Rectangle(20, 20, 200, 100)
Dim myLGBrush As New LinearGradientBrush(myRect, Color.Blue, _
Color.Red, 0.0F, True)
' Draw an ellipse to the screen using the LinearGradientBrush.
e.Graphics.FillEllipse(myLGBrush, myRect)
' Transform the LinearGradientBrush.
Dim transformArray As Point() = {New Point(20, 150), _
New Point(400, 150), New Point(20, 200)}
Dim myMatrix As New Matrix(myRect, transformArray)
myLGBrush.MultiplyTransform(myMatrix, MatrixOrder.Prepend)
' Draw a second ellipse to the screen using the transformed brush.
e.Graphics.FillEllipse(myLGBrush, 20, 150, 380, 50)
End Sub
Platí pro
MultiplyTransform(Matrix)
- Zdroj:
- LinearGradientBrush.cs
- Zdroj:
- LinearGradientBrush.cs
- Zdroj:
- LinearGradientBrush.cs
Vynásobí hodnotu Matrix , která představuje místní geometrickou transformaci, LinearGradientBrush o hodnotu určenou Matrix předponou zadaného Matrixobjektu .
public:
void MultiplyTransform(System::Drawing::Drawing2D::Matrix ^ matrix);
public void MultiplyTransform (System.Drawing.Drawing2D.Matrix matrix);
member this.MultiplyTransform : System.Drawing.Drawing2D.Matrix -> unit
Public Sub MultiplyTransform (matrix As Matrix)
Parametry
Příklady
Příklad naleznete v tématu MultiplyTransform.
Platí pro
Váš názor
https://aka.ms/ContentUserFeedback.
Připravujeme: V průběhu roku 2024 budeme postupně vyřazovat problémy z GitHub coby mechanismus zpětné vazby pro obsah a nahrazovat ho novým systémem zpětné vazby. Další informace naleznete v tématu:Odeslat a zobrazit názory pro