Salut
je veux intégrer dans mon application potrace, pour ça j'ai télécharger la librairie libpotrace.dll pour faire cela j'allai utilisé JNA afin d'appelé la fonction :
mais j'arrive pas a comprendre comment utiliser ces paramètres :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 potrace_state_t *potrace_trace(const potrace_param_t *param, const potrace_bitmap_t *bm);
le paramètre de sortie :potrace_state_t
les paramètre d'entré :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 struct potrace_state_s { int status; potrace_path_t *plist; /* vector data */ struct potrace_privstate_s *priv; /* private state */ }; typedef struct potrace_state_s potrace_state_t;
potrace_param_t
potrace_bitmap_t
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 struct potrace_param_s { int turdsize; int turnpolicy; double alphamax; int opticurve; double opttolerance; potrace_progress_t progress; }; typedef struct potrace_param_s potrace_param_t;
merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 struct potrace_bitmap_s { int w, h; /* width and height, in pixels */ int dy; /* scanline offset in words */ potrace_word *map; /* pixel data, dy*h words */ }; typedef struct potrace_bitmap_s potrace_bitmap_t; typedef unsigned long potrace_word;
Partager