Enumerazione StrokeType

Indica se un tratto deve essere analizzato come parte di un disegno o come parte della scrittura.

Sintassi

typedef enum StrokeType { 
  StrokeType_Unclassified  = 0,
  StrokeType_Writing       = 1,
  StrokeType_Drawing       = 2
} StrokeType;

Costanti

StrokeType_Unclassified

Il tratto può essere parte di un disegno o parte della scrittura.

StrokeType_Writing

Il tratto fa parte della scrittura.

StrokeType_Drawing

Il tratto fa parte di un disegno.

Esempio

Nell'esempio seguente viene illustrata parte di un gestore eventi stroke, implementata in modo simile all'esempio sink di eventi C++. Il tratto aggiunto viene selezionato per verificare se la parte superiore del riquadro è stata disegnata sotto un margine, drawingMargin. In tal caso, l'oggetto IInkAnalyzer , m_spInkAnalyzer, viene impostato per analizzare il tratto come tratto di disegno, anziché come tratto di grafia. CheckHResult è una funzione che accetta e HRESULT una stringa e genera un'eccezione creata con la stringa se non HRESULT è SUCCESS.

IInkRectangle* bounds;
CheckHResult(pStroke->GetBoundingBox(IBBM_Default, &bounds), "IInkStrokeDisp::GetBoundingBox failed");
long top;
CheckHResult(bounds->get_Top(&top), "IInkRectangle::get_Top failed");
if (top > drawingMargin)
{
    long strokeId;
    CheckHResult(pStroke->get_ID(&strokeId), "IInkStrokeDisp::get_ID failed");
    m_pInkAnalyzer->SetStrokeType(strokeId, StrokeType_Drawing);
}

Requisiti

Requisito Valore
Client minimo supportato
Windows XP Tablet PC Edition [solo app desktop]
Server minimo supportato
Nessuno supportato
Intestazione
IACom.h (richiede anche IACom_i.c)

Vedi anche

Metodo IInkAnalyzer::SetStrokeType