Condividi tramite


Proprietà DynamicRenderer.DrawingAttributes

Aggiornamento: novembre 2007

Ottiene o imposta l'oggetto DrawingAttributes utilizzato dall'oggetto DynamicRenderer.

Spazio dei nomi:  Microsoft.StylusInput
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Sintassi

'Dichiarazione
Public Property DrawingAttributes As DrawingAttributes
'Utilizzo
Dim instance As DynamicRenderer
Dim value As DrawingAttributes

value = instance.DrawingAttributes

instance.DrawingAttributes = value
public DrawingAttributes DrawingAttributes { get; set; }
public:
property DrawingAttributes^ DrawingAttributes {
    DrawingAttributes^ get ();
    void set (DrawingAttributes^ value);
}
/** @property */
public DrawingAttributes get_DrawingAttributes()
/** @property */
public  void set_DrawingAttributes(DrawingAttributes value)
public function get DrawingAttributes () : DrawingAttributes
public function set DrawingAttributes (value : DrawingAttributes)

Valore proprietà

Tipo: Microsoft.Ink.DrawingAttributes
Oggetto DrawingAttributes utilizzato dall'oggetto DynamicRenderer.

Note

Se questa proprietà viene modificata mentre un utente disegna un tratto, i nuovi attributi di disegno non vengono applicati al tratto corrente ma al tratto disegnato successivo. Ad esempio, l'impostazione di questa proprietà in un metodo StylusDown di un'implementazione IStylusAsyncPlugin non influisce sul tratto che sta per essere creato.

Quando si verifica un evento DisplaySettingsChanged, ricalcolare le proprietà Width e Height dell'oggetto DrawingAttributes in un gestore dell'evento DisplaySettingsChanged. Questa operazione è necessaria per tenere conto di possibili modifiche in dpi (punti per pollice) derivanti dall'evento DisplaySettingsChanged.

Di seguito vengono presentati i valori predefiniti per gli attributi di disegno:

Attributo di disegno

Valore

AntiAliased

true

Color

Color.Black

FitToCurve

false

Height

1

IgnorePressure

false

PenTip

Ball

RasterOperation

RasterOperation

Transparency

0

Width

53

Esempi

In questo esempio C# viene impostato il colore rosso dei tratti di cui è stato eseguito il rendering dinamico, tramite un oggetto DynamicRenderer, theDynamicRenderer.

theDynamicRenderer.DrawingAttributes.Color = Color.Red;

In questo esempio Visual Basic .NET viene impostato il colore rosso dei tratti di cui è stato eseguito il rendering dinamico, tramite un oggetto DynamicRenderer, theDynamicRenderer.

theDynamicRenderer.DrawingAttributes.Color = Color.Red

Piattaforme

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework e .NET Compact Framework non supportano tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.

Informazioni sulla versione

.NET Framework

Supportato in: 3.0

Vedere anche

Riferimenti

DynamicRenderer Classe

Membri DynamicRenderer

Spazio dei nomi Microsoft.StylusInput

Stroke.DrawingAttributes