SDL Wiki
(This is the documentation for SDL3, which is under heavy development and the API is changing! SDL2 is the current stable version!)


Retrieves the pen type for a given SDL_PenID.

Header File

Defined in <SDL3/SDL_pen.h>


SDL_PenSubtype SDL_GetPenType(SDL_PenID instance_id);

Function Parameters

SDL_PenID instance_id the pen to query.

Return Value

(SDL_PenSubtype) Returns the corresponding pen type (cf. SDL_PenSubtype) or 0 on error. Note that the pen type does not dictate whether the pen tip is SDL_PEN_TIP_INK or SDL_PEN_TIP_ERASER; to determine whether a pen is being used for drawing or in eraser mode, check either the pen tip on SDL_EVENT_PEN_DOWN, or the flag SDL_PEN_ERASER_MASK in the pen state.


This function is available since SDL 3.0.0.

CategoryAPI, CategoryAPIFunction, CategoryPen

[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.