Color.FromArgb 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í.
Vytvoří Color strukturu ze čtyř 8bitových komponent ARGB (alfa, červená, zelená a modrá).
Přetížení
FromArgb(Int32, Int32, Int32, Int32) |
Vytvoří Color strukturu ze čtyř hodnot komponenty ARGB (alfa, červená, zelená a modrá). Ačkoli tato metoda umožňuje předání 32bitové hodnoty pro každou komponentu, hodnota každé komponenty je omezena na 8 bitů. |
FromArgb(Int32, Int32, Int32) |
Vytvoří Color strukturu ze zadaných 8bitových hodnot barev (červená, zelená a modrá). Hodnota alfa je implicitně 255 (zcela neprůselná). I když tato metoda umožňuje předání 32bitové hodnoty pro každou komponentu barvy, hodnota každé komponenty je omezena na 8 bitů. |
FromArgb(Int32, Color) |
Color Vytvoří strukturu ze zadané Color struktury, ale s novou zadanou alfa hodnotou. I když tato metoda umožňuje předání 32bitové hodnoty pro hodnotu alfa, hodnota je omezena na 8 bitů. |
FromArgb(Int32) |
Vytvoří Color strukturu z 32bitové hodnoty ARGB. |
FromArgb(Int32, Int32, Int32, Int32)
- Zdroj:
- Color.cs
- Zdroj:
- Color.cs
- Zdroj:
- Color.cs
Vytvoří Color strukturu ze čtyř hodnot komponenty ARGB (alfa, červená, zelená a modrá). Ačkoli tato metoda umožňuje předání 32bitové hodnoty pro každou komponentu, hodnota každé komponenty je omezena na 8 bitů.
public:
static System::Drawing::Color FromArgb(int alpha, int red, int green, int blue);
public static System.Drawing.Color FromArgb (int alpha, int red, int green, int blue);
static member FromArgb : int * int * int * int -> System.Drawing.Color
Public Shared Function FromArgb (alpha As Integer, red As Integer, green As Integer, blue As Integer) As Color
Parametry
- alpha
- Int32
Komponenta alfa. Platné hodnoty jsou 0 až 255.
- red
- Int32
Červená komponenta. Platné hodnoty jsou 0 až 255.
- green
- Int32
Zelená komponenta. Platné hodnoty jsou 0 až 255.
- blue
- Int32
Modrá komponenta. Platné hodnoty jsou 0 až 255.
Návraty
Hodnota Color , kterou tato metoda vytvoří.
Výjimky
alpha
, red
, green
nebo blue
je menší než 0 nebo větší než 255.
Příklady
Následující příklad kódu je určen pro použití s model Windows Forms a vyžaduje PaintEventArgse
, což je parametr obslužné rutiny Paint události. Kód provede následující akce:
Vytvoří tři štětce, z nichž každý má jinou barvu. Každá Color struktura, která se používá k vytvoření štětce, se vytvoří ze čtyř hodnot komponent (alfa, červená, zelená, modrá).
Pomocí imaginárního trojúhelníku umístíte tři kruhy.
Maluje tři překrývající se kruhy, z nichž každý je uprostřed jednoho vrcholu trojúhelníku, pomocí jiného štětce pro každý kruh.
void FromArgb1( PaintEventArgs^ e )
{
Graphics^ g = e->Graphics;
// Transparent red, green, and blue brushes.
SolidBrush^ trnsRedBrush = gcnew SolidBrush( Color::FromArgb( 120, 255, 0, 0 ) );
SolidBrush^ trnsGreenBrush = gcnew SolidBrush( Color::FromArgb( 120, 0, 255, 0 ) );
SolidBrush^ trnsBlueBrush = gcnew SolidBrush( Color::FromArgb( 120, 0, 0, 255 ) );
// Base and height of the triangle that is used to position the
// circles. Each vertex of the triangle is at the center of one of the
// 3 circles. The base is equal to the diameter of the circles.
float triBase = 100;
float triHeight = (float)Math::Sqrt( 3 * (triBase * triBase) / 4 );
// Coordinates of first circle's bounding rectangle.
float x1 = 40;
float y1 = 40;
// Fill 3 over-lapping circles. Each circle is a different color.
g->FillEllipse( trnsRedBrush, x1, y1, 2 * triHeight, 2 * triHeight );
g->FillEllipse( trnsGreenBrush, x1 + triBase / 2, y1 + triHeight, 2 * triHeight, 2 * triHeight );
g->FillEllipse( trnsBlueBrush, x1 + triBase, y1, 2 * triHeight, 2 * triHeight );
}
public void FromArgb1(PaintEventArgs e)
{
Graphics g = e.Graphics;
// Transparent red, green, and blue brushes.
SolidBrush trnsRedBrush = new SolidBrush(Color.FromArgb(120, 255, 0, 0));
SolidBrush trnsGreenBrush = new SolidBrush(Color.FromArgb(120, 0, 255, 0));
SolidBrush trnsBlueBrush = new SolidBrush(Color.FromArgb(120, 0, 0, 255));
// Base and height of the triangle that is used to position the
// circles. Each vertex of the triangle is at the center of one of the
// 3 circles. The base is equal to the diameter of the circles.
float triBase = 100;
float triHeight = (float)Math.Sqrt(3*(triBase*triBase)/4);
// Coordinates of first circle's bounding rectangle.
float x1 = 40;
float y1 = 40;
// Fill 3 over-lapping circles. Each circle is a different color.
g.FillEllipse(trnsRedBrush, x1, y1, 2*triHeight, 2*triHeight);
g.FillEllipse(trnsGreenBrush, x1 + triBase/2, y1 + triHeight,
2*triHeight, 2*triHeight);
g.FillEllipse(trnsBlueBrush, x1 + triBase, y1, 2*triHeight, 2*triHeight);
}
Public Sub FromArgb1(ByVal e As PaintEventArgs)
Dim g As Graphics = e.Graphics
' Transparent red, green, and blue brushes.
Dim trnsRedBrush As New SolidBrush(Color.FromArgb(120, 255, 0, 0))
Dim trnsGreenBrush As New SolidBrush(Color.FromArgb(120, 0, _
255, 0))
Dim trnsBlueBrush As New SolidBrush(Color.FromArgb(120, 0, 0, 255))
' Base and height of the triangle that is used to position the
' circles. Each vertex of the triangle is at the center of one of
' the 3 circles. The base is equal to the diameter of the circle.
Dim triBase As Single = 100
Dim triHeight As Single = CSng(Math.Sqrt((3 * (triBase * _
triBase) / 4)))
' Coordinates of first circle's bounding rectangle.
Dim x1 As Single = 40
Dim y1 As Single = 40
' Fill 3 over-lapping circles. Each circle is a different color.
g.FillEllipse(trnsRedBrush, x1, y1, 2 * triHeight, 2 * triHeight)
g.FillEllipse(trnsGreenBrush, x1 + triBase / 2, y1 + triHeight, _
2 * triHeight, 2 * triHeight)
g.FillEllipse(trnsBlueBrush, x1 + triBase, y1, 2 * triHeight, _
2 * triHeight)
End Sub
Poznámky
Pokud chcete vytvořit neprůsvitnou barvu, nastavte alpha
na 255. Pokud chcete vytvořit poloprůhlednou barvu, nastavte alpha
na libovolnou hodnotu od 1 do 254.
Platí pro
FromArgb(Int32, Int32, Int32)
- Zdroj:
- Color.cs
- Zdroj:
- Color.cs
- Zdroj:
- Color.cs
Vytvoří Color strukturu ze zadaných 8bitových hodnot barev (červená, zelená a modrá). Hodnota alfa je implicitně 255 (zcela neprůselná). I když tato metoda umožňuje předání 32bitové hodnoty pro každou komponentu barvy, hodnota každé komponenty je omezena na 8 bitů.
public:
static System::Drawing::Color FromArgb(int red, int green, int blue);
public static System.Drawing.Color FromArgb (int red, int green, int blue);
static member FromArgb : int * int * int -> System.Drawing.Color
Public Shared Function FromArgb (red As Integer, green As Integer, blue As Integer) As Color
Parametry
Návraty
Hodnota Color , kterou tato metoda vytvoří.
Výjimky
red
, green
nebo blue
je menší než 0 nebo větší než 255.
Příklady
Následující příklad kódu je určen pro použití s model Windows Forms a vyžaduje PaintEventArgse
, což je parametr obslužné rutiny Paint události. Kód provede následující akce:
Vytvoří Color struktury z hodnot tří barevných komponent (červená, zelená, modrá). Vytvoří se tři Color struktury, jedna pro každou primární barvu.
Iteruje rozsahem alfa hodnot a mění alfa hodnotu barvy.
Během každé iterace nastaví barvu štětce na upravenou barvu a nakreslí obdélník, aby se barva zobrazila.
Zopakuje kroky 2 a 3 pro každou primární barvu.
Hodnota alfa není nikdy zcela neprůhlhlá a obdélníky se překrývají, takže získáte efekty barevné kombinace.
void FromArgb2( PaintEventArgs^ e )
{
Graphics^ g = e->Graphics;
// Opaque colors (alpha value defaults to 255 -- max value).
Color red = Color::FromArgb( 255, 0, 0 );
Color green = Color::FromArgb( 0, 255, 0 );
Color blue = Color::FromArgb( 0, 0, 255 );
// Solid brush initialized to red.
SolidBrush^ myBrush = gcnew SolidBrush( red );
int alpha;
// x coordinate of first red rectangle
int x = 50;
// y coordinate of first red rectangle
int y = 50;
// Fill rectangles with red, varying the alpha value from 25 to 250.
for ( alpha = 25; alpha <= 250; alpha += 25 )
{
myBrush->Color = Color::FromArgb( alpha, red );
g->FillRectangle( myBrush, x, y, 50, 100 );
g->FillRectangle( myBrush, x, y + 250, 50, 50 );
x += 50;
}
x = 50;
// y coordinate of first green rectangle.
y += 50;
// Fill rectangles with green, varying the alpha value from 25 to 250.
for ( alpha = 25; alpha <= 250; alpha += 25 )
{
myBrush->Color = Color::FromArgb( alpha, green );
g->FillRectangle( myBrush, x, y, 50, 150 );
x += 50;
}
x = 50;
// y coordinate of first blue rectangle.
y += 100;
// Fill rectangles with blue, varying the alpha value from 25 to 250.
for ( alpha = 25; alpha <= 250; alpha += 25 )
{
myBrush->Color = Color::FromArgb( alpha, blue );
g->FillRectangle( myBrush, x, y, 50, 150 );
x += 50;
}
}
public void FromArgb2(PaintEventArgs e)
{
Graphics g = e.Graphics;
// Opaque colors (alpha value defaults to 255 -- max value).
Color red = Color.FromArgb(255, 0, 0);
Color green = Color.FromArgb(0, 255, 0);
Color blue = Color.FromArgb(0, 0, 255);
// Solid brush initialized to red.
SolidBrush myBrush = new SolidBrush(red);
int alpha;
// x coordinate of first red rectangle
int x = 50;
// y coordinate of first red rectangle
int y = 50;
// Fill rectangles with red, varying the alpha value from 25 to 250.
for (alpha = 25; alpha <= 250; alpha += 25)
{
myBrush.Color = Color.FromArgb(alpha, red);
g.FillRectangle(myBrush, x, y, 50, 100);
g.FillRectangle(myBrush, x, y + 250, 50, 50);
x += 50;
}
// x coordinate of first green rectangle.
x = 50;
// y coordinate of first green rectangle.
y += 50;
// Fill rectangles with green, varying the alpha value from 25 to 250.
for (alpha = 25; alpha <= 250; alpha += 25)
{
myBrush.Color = Color.FromArgb(alpha, green);
g.FillRectangle(myBrush, x, y, 50, 150);
x += 50;
}
// x coordinate of first blue rectangle.
x = 50;
// y coordinate of first blue rectangle.
y += 100;
// Fill rectangles with blue, varying the alpha value from 25 to 250.
for (alpha = 25; alpha <= 250; alpha += 25)
{
myBrush.Color = Color.FromArgb(alpha, blue);
g.FillRectangle(myBrush, x, y, 50, 150);
x += 50;
}
}
Public Sub FromArgb2(ByVal e As PaintEventArgs)
Dim g As Graphics = e.Graphics
' Opaque colors (alpha value defaults to 255 -- max value).
Dim red As Color = Color.FromArgb(255, 0, 0)
Dim green As Color = Color.FromArgb(0, 255, 0)
Dim blue As Color = Color.FromArgb(0, 0, 255)
' Solid brush initialized to red.
Dim myBrush As New SolidBrush(red)
Dim alpha As Integer
' x coordinate of first red rectangle.
Dim x As Integer = 50
' y coordinate of first red rectangle.
Dim y As Integer = 50
' Fill rectangles with red, varying the alpha value from 25 to 250.
For alpha = 25 To 250 Step 25
myBrush.Color = Color.FromArgb(alpha, red)
g.FillRectangle(myBrush, x, y, 50, 100)
g.FillRectangle(myBrush, x, y + 250, 50, 50)
x += 50
Next alpha
' x coordinate of first green rectangle.
x = 50
' y coordinate of first green rectangle.
y += 50
' Fill rectangles with green, varying alpha value from 25 to 250.
For alpha = 25 To 250 Step 25
myBrush.Color = Color.FromArgb(alpha, green)
g.FillRectangle(myBrush, x, y, 50, 150)
x += 50
Next alpha
' x coordinate of first blue rectangle.
x = 50
' y coordinate of first blue rectangle.
y += 100
' Fill rectangles with blue, varying alpha value from 25 to 250.
For alpha = 25 To 250 Step 25
myBrush.Color = Color.FromArgb(alpha, blue)
g.FillRectangle(myBrush, x, y, 50, 150)
x += 50
Next alpha
End Sub
Platí pro
FromArgb(Int32, Color)
- Zdroj:
- Color.cs
- Zdroj:
- Color.cs
- Zdroj:
- Color.cs
public:
static System::Drawing::Color FromArgb(int alpha, System::Drawing::Color baseColor);
public static System.Drawing.Color FromArgb (int alpha, System.Drawing.Color baseColor);
static member FromArgb : int * System.Drawing.Color -> System.Drawing.Color
Public Shared Function FromArgb (alpha As Integer, baseColor As Color) As Color
Parametry
Návraty
Hodnota Color , kterou tato metoda vytvoří.
Výjimky
alpha
je menší než 0 nebo větší než 255.
Příklady
Následující příklad kódu je určen pro použití s model Windows Forms a vyžaduje PaintEventArgse
, což je parametr obslužné rutiny Paint události. Kód provede následující akce:
Vytvoří Color struktury z hodnot tří barevných komponent (červená, zelená, modrá). Vytvoří se tři Color struktury, jedna pro každou primární barvu.
Iteruje rozsahem alfa hodnot a mění alfa hodnotu barvy.
Během každé iterace nastaví barvu štětce na upravenou barvu a nakreslí obdélník, aby se barva zobrazila.
Zopakuje kroky 2 a 3 pro každou primární barvu.
Hodnota alfa není nikdy zcela neprůhlhlá a obdélníky se překrývají, takže získáte efekty barevné kombinace.
void FromArgb3( PaintEventArgs^ e )
{
Graphics^ g = e->Graphics;
// Opaque colors (alpha value defaults to 255 -- max value).
Color red = Color::FromArgb( 255, 0, 0 );
Color green = Color::FromArgb( 0, 255, 0 );
Color blue = Color::FromArgb( 0, 0, 255 );
// Solid brush initialized to red.
SolidBrush^ myBrush = gcnew SolidBrush( red );
int alpha;
// x coordinate of first red rectangle
int x = 50;
// y coordinate of first red rectangle
int y = 50;
// Fill rectangles with red, varying the alpha value from 25 to 250.
for ( alpha = 25; alpha <= 250; alpha += 25 )
{
myBrush->Color = Color::FromArgb( alpha, red );
g->FillRectangle( myBrush, x, y, 50, 100 );
g->FillRectangle( myBrush, x, y + 250, 50, 50 );
x += 50;
}
x = 50;
// y coordinate of first green rectangle
y += 50;
// Fill rectangles with green, varying the alpha value from 25 to 250.
for ( alpha = 25; alpha <= 250; alpha += 25 )
{
myBrush->Color = Color::FromArgb( alpha, green );
g->FillRectangle( myBrush, x, y, 50, 150 );
x += 50;
}
x = 50;
// y coordinate of first blue rectangle
y += 100;
// Fill rectangles with blue, varying the alpha value from 25 to 250.
for ( alpha = 25; alpha <= 250; alpha += 25 )
{
myBrush->Color = Color::FromArgb( alpha, blue );
g->FillRectangle( myBrush, x, y, 50, 150 );
x += 50;
}
}
public void FromArgb3(PaintEventArgs e)
{
Graphics g = e.Graphics;
// Opaque colors (alpha value defaults to 255 -- max value).
Color red = Color.FromArgb(255, 0, 0);
Color green = Color.FromArgb(0, 255, 0);
Color blue = Color.FromArgb(0, 0, 255);
// Solid brush initialized to red.
SolidBrush myBrush = new SolidBrush(red);
int alpha;
// x coordinate of first red rectangle
int x = 50;
// y coordinate of first red rectangle
int y = 50;
// Fill rectangles with red, varying the alpha value from 25 to 250.
for (alpha = 25; alpha <= 250; alpha += 25)
{
myBrush.Color = Color.FromArgb(alpha, red);
g.FillRectangle(myBrush, x, y, 50, 100);
g.FillRectangle(myBrush, x, y + 250, 50, 50);
x += 50;
}
// x coordinate of first green rectangle
x = 50;
// y coordinate of first green rectangle
y += 50;
// Fill rectangles with green, varying the alpha value from 25 to 250.
for (alpha = 25; alpha <= 250; alpha += 25)
{
myBrush.Color = Color.FromArgb(alpha, green);
g.FillRectangle(myBrush, x, y, 50, 150);
x += 50;
}
// x coordinate of first blue rectangle.
x = 50;
// y coordinate of first blue rectangle
y += 100;
// Fill rectangles with blue, varying the alpha value from 25 to 250.
for (alpha = 25; alpha <= 250; alpha += 25)
{
myBrush.Color = Color.FromArgb(alpha, blue);
g.FillRectangle(myBrush, x, y, 50, 150);
x += 50;
}
}
Public Sub FromArgb3(ByVal e As PaintEventArgs)
Dim g As Graphics = e.Graphics
' Opaque colors (alpha value defaults to 255 -- max value).
Dim red As Color = Color.FromArgb(255, 0, 0)
Dim green As Color = Color.FromArgb(0, 255, 0)
Dim blue As Color = Color.FromArgb(0, 0, 255)
' Solid brush initialized to red.
Dim myBrush As New SolidBrush(red)
Dim alpha As Integer
' x coordinate of first red rectangle.
Dim x As Integer = 50
' y coordinate of first red rectangle.
Dim y As Integer = 50
' Fill rectangles with red, varying the alpha value from 25 to 250.
For alpha = 25 To 250 Step 25
myBrush.Color = Color.FromArgb(alpha, red)
g.FillRectangle(myBrush, x, y, 50, 100)
g.FillRectangle(myBrush, x, y + 250, 50, 50)
x += 50
Next alpha
' x coordinate of first green rectangle.
x = 50
' y coordinate of first green rectangle.
y += 50
' Fill rectangles with green, varying alpha value from 25 to 250.
For alpha = 25 To 250 Step 25
myBrush.Color = Color.FromArgb(alpha, green)
g.FillRectangle(myBrush, x, y, 50, 150)
x += 50
Next alpha
' x coordinate of first blue rectangle.
x = 50
' y coordinate of first blue rectangle.
y += 100
' Fill rectangles with blue, varying alpha value from 25 to 250.
For alpha = 25 To 250 Step 25
myBrush.Color = Color.FromArgb(alpha, blue)
g.FillRectangle(myBrush, x, y, 50, 150)
x += 50
Next alpha
End Sub
Poznámky
Pokud chcete vytvořit neprůsvitnou barvu, nastavte alpha
na 255. Pokud chcete vytvořit poloprůhlednou barvu, nastavte alpha
na libovolnou hodnotu od 1 do 254.
Platí pro
FromArgb(Int32)
- Zdroj:
- Color.cs
- Zdroj:
- Color.cs
- Zdroj:
- Color.cs
Vytvoří Color strukturu z 32bitové hodnoty ARGB.
public:
static System::Drawing::Color FromArgb(int argb);
public static System.Drawing.Color FromArgb (int argb);
static member FromArgb : int -> System.Drawing.Color
Public Shared Function FromArgb (argb As Integer) As Color
Parametry
- argb
- Int32
Hodnota určující 32bitovou hodnotu ARGB.
Návraty
Struktura Color , kterou tato metoda vytvoří.
Příklady
Následující příklad kódu je určen pro použití s model Windows Forms a vyžaduje PaintEventArgse
, což je parametr obslužné rutiny Paint události. Kód provede následující akce:
Vytvoří tři štětce, z nichž každý má jinou barvu. Každá Color struktura, která se používá k vytvoření štětce, se vytvoří z 32bitové hodnoty ARGB.
Pomocí imaginárního trojúhelníku umístíte tři kruhy.
Maluje tři překrývající se kruhy, z nichž každý je uprostřed jednoho vrcholu trojúhelníku, pomocí jiného štětce pro každý kruh.
void FromArgb4( PaintEventArgs^ e )
{
Graphics^ g = e->Graphics;
// Transparent red, green, and blue brushes.
SolidBrush^ trnsRedBrush = gcnew SolidBrush( Color::FromArgb( 0x78FF0000 ) );
SolidBrush^ trnsGreenBrush = gcnew SolidBrush( Color::FromArgb( 0x7800FF00 ) );
SolidBrush^ trnsBlueBrush = gcnew SolidBrush( Color::FromArgb( 0x780000FF ) );
// Base and height of the triangle that is used to position the
// circles. Each vertex of the triangle is at the center of one of the
// 3 circles. The base is equal to the diameter of the circles.
float triBase = 100;
float triHeight = (float)Math::Sqrt( 3 * (triBase * triBase) / 4 );
// coordinates of first circle's bounding rectangle.
float x1 = 40;
float y1 = 40;
// Fill 3 over-lapping circles. Each circle is a different color.
g->FillEllipse( trnsRedBrush, x1, y1, 2 * triHeight, 2 * triHeight );
g->FillEllipse( trnsGreenBrush, x1 + triBase / 2, y1 + triHeight, 2 * triHeight, 2 * triHeight );
g->FillEllipse( trnsBlueBrush, x1 + triBase, y1, 2 * triHeight, 2 * triHeight );
}
public void FromArgb4(PaintEventArgs e)
{
Graphics g = e.Graphics;
// Transparent red, green, and blue brushes.
SolidBrush trnsRedBrush = new SolidBrush(Color.FromArgb(0x78FF0000));
SolidBrush trnsGreenBrush = new SolidBrush(Color.FromArgb(0x7800FF00));
SolidBrush trnsBlueBrush = new SolidBrush(Color.FromArgb(0x780000FF));
// Base and height of the triangle that is used to position the
// circles. Each vertex of the triangle is at the center of one of the
// 3 circles. The base is equal to the diameter of the circles.
float triBase = 100;
float triHeight = (float)Math.Sqrt(3*(triBase*triBase)/4);
// coordinates of first circle's bounding rectangle.
float x1 = 40;
float y1 = 40;
// Fill 3 over-lapping circles. Each circle is a different color.
g.FillEllipse(trnsRedBrush, x1, y1, 2*triHeight, 2*triHeight);
g.FillEllipse(trnsGreenBrush, x1 + triBase/2, y1 + triHeight,
2*triHeight, 2*triHeight);
g.FillEllipse(trnsBlueBrush, x1 + triBase, y1, 2*triHeight, 2*triHeight);
}
Public Sub FromArgb4(ByVal e As PaintEventArgs)
Dim g As Graphics = e.Graphics
' Transparent red, green, and blue brushes.
Dim trnsRedBrush As New SolidBrush(Color.FromArgb(&H78FF0000))
Dim trnsGreenBrush As New SolidBrush(Color.FromArgb(&H7800FF00))
Dim trnsBlueBrush As New SolidBrush(Color.FromArgb(&H780000FF))
' Base and height of the triangle that is used to position the
' circles. Each vertex of the triangle is at the center of one of
' the 3 circles. The base is equal to the diameter of the circle.
Dim triBase As Single = 100
Dim triHeight As Single = CSng(Math.Sqrt((3 * (triBase * _
triBase) / 4)))
' Coordinates of first circle
's bounding rectangle.
Dim x1 As Single = 40
Dim y1 As Single = 40
' Fill 3 over-lapping circles. Each circle is a different color.
g.FillEllipse(trnsRedBrush, x1, y1, 2 * triHeight, 2 * triHeight)
g.FillEllipse(trnsGreenBrush, x1 + triBase / 2, y1 + triHeight, _
2 * triHeight, 2 * triHeight)
g.FillEllipse(trnsBlueBrush, x1 + triBase, y1, 2 * triHeight, _
2 * triHeight)
End Sub
Poznámky
Pořadí bajtů 32bitové hodnoty ARGB je AARRGGBB. Nejvýznamnější bajt (MSB) reprezentovaný AA je hodnota komponenty alfa. Druhé, třetí a čtvrté bajty reprezentované RR, GG a BB jsou složky barvy červené, zelené a modré.
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