… | |
… | |
320 | /* Normalized values [0..1] for each component |
320 | /* Normalized values [0..1] for each component |
321 | Origin is (x,y)=(0,0), to get pixel at (X,Y) use index [Y*xsize+X] */ |
321 | Origin is (x,y)=(0,0), to get pixel at (X,Y) use index [Y*xsize+X] */ |
322 | typedef struct psiconv_paint_data_section { |
322 | typedef struct psiconv_paint_data_section { |
323 | psiconv_u32 xsize; |
323 | psiconv_u32 xsize; |
324 | psiconv_u32 ysize; |
324 | psiconv_u32 ysize; |
|
|
325 | psiconv_length_t pic_xsize; /* 0 if not specified */ |
|
|
326 | psiconv_length_t pic_ysize; /* 0 if not specified */ |
325 | float *red; |
327 | float *red; |
326 | float *green; |
328 | float *green; |
327 | float *blue; |
329 | float *blue; |
328 | } *psiconv_paint_data_section; |
330 | } *psiconv_paint_data_section; |
329 | |
331 | |
… | |
… | |
331 | /* of struct psiconv_paint_data_section */ |
333 | /* of struct psiconv_paint_data_section */ |
332 | |
334 | |
333 | typedef struct psiconv_mbm_f { |
335 | typedef struct psiconv_mbm_f { |
334 | psiconv_pictures sections; |
336 | psiconv_pictures sections; |
335 | } *psiconv_mbm_f; |
337 | } *psiconv_mbm_f; |
|
|
338 | |
|
|
339 | /* This is a little intricated. A picture may be embedded in a larger form. |
|
|
340 | A form is empty, except for the picture. The form has size form_{x,y}size, |
|
|
341 | and the picture is at offset picture_{x,y}_offset within the form. The |
|
|
342 | picture itself has size picture_{x,y}size. |
|
|
343 | Cuts are always <= 1.0; a cut of 0.0 cuts nothing away, a cut of 1.0 |
|
|
344 | cuts everything away. */ |
|
|
345 | typedef struct psiconv_sketch_section { |
|
|
346 | psiconv_u16 form_xsize; |
|
|
347 | psiconv_u16 form_ysize; |
|
|
348 | psiconv_u16 picture_x_offset; |
|
|
349 | psiconv_u16 picture_y_offset; |
|
|
350 | psiconv_u16 picture_xsize; |
|
|
351 | psiconv_u16 picture_ysize; |
|
|
352 | float magnification_x; /* computed relative to first six values */ |
|
|
353 | float magnification_y; /* computed relative to first six values */ |
|
|
354 | float cut_left; /* computed relative to first six values */ |
|
|
355 | float cut_right; /* computed relative to first six values */ |
|
|
356 | float cut_top; /* computed relative to first six values */ |
|
|
357 | float cut_bottom; /* computed relative to first six values */ |
|
|
358 | psiconv_paint_data_section picture; |
|
|
359 | } *psiconv_sketch_section; |
|
|
360 | |
|
|
361 | typedef struct psiconv_sketch_f { |
|
|
362 | psiconv_sketch_section sketch_sec; |
|
|
363 | } *psiconv_sketch_f; |
336 | |
364 | |
337 | typedef struct psiconv_file { |
365 | typedef struct psiconv_file { |
338 | psiconv_file_type_t type; |
366 | psiconv_file_type_t type; |
339 | void *file; |
367 | void *file; |
340 | } *psiconv_file; |
368 | } *psiconv_file; |
… | |
… | |
346 | #define PSICONV_ID_DATA_FILE 0x1000006D |
374 | #define PSICONV_ID_DATA_FILE 0x1000006D |
347 | #define PSICONV_ID_MBM_FILE 0x10000042 |
375 | #define PSICONV_ID_MBM_FILE 0x10000042 |
348 | /* UID3 */ |
376 | /* UID3 */ |
349 | #define PSICONV_ID_WORD 0x1000007F |
377 | #define PSICONV_ID_WORD 0x1000007F |
350 | #define PSICONV_ID_TEXTED 0x10000085 |
378 | #define PSICONV_ID_TEXTED 0x10000085 |
|
|
379 | #define PSICONV_ID_SKETCH 0x1000007D |
351 | |
380 | |
352 | /* Section table ids */ |
381 | /* Section table ids */ |
353 | #define PSICONV_ID_WORD_STATUS_SECTION 0x10000243 |
382 | #define PSICONV_ID_WORD_STATUS_SECTION 0x10000243 |
354 | #define PSICONV_ID_APPL_ID_SECTION 0x10000089 |
383 | #define PSICONV_ID_APPL_ID_SECTION 0x10000089 |
355 | #define PSICONV_ID_TEXT_SECTION 0x10000106 |
384 | #define PSICONV_ID_TEXT_SECTION 0x10000106 |
356 | #define PSICONV_ID_LAYOUT_SECTION 0x10000143 |
385 | #define PSICONV_ID_LAYOUT_SECTION 0x10000143 |
357 | #define PSICONV_ID_WORD_STYLES_SECTION 0x10000104 |
386 | #define PSICONV_ID_WORD_STYLES_SECTION 0x10000104 |
358 | #define PSICONV_ID_PAGE_LAYOUT_SECTION 0x10000105 |
387 | #define PSICONV_ID_PAGE_LAYOUT_SECTION 0x10000105 |
359 | #define PSICONV_ID_PASSWORD_SECTION 0x100000CD |
388 | #define PSICONV_ID_PASSWORD_SECTION 0x100000CD |
|
|
389 | #define PSICONV_ID_SKETCH_SECTION 0x1000007D |
360 | |
390 | |
361 | /* Other ids */ |
391 | /* Other ids */ |
362 | #define PSICONV_ID_PAGE_DIMENSIONS 0x100000fd |
392 | #define PSICONV_ID_PAGE_DIMENSIONS 0x100000fd |
363 | #define PSICONV_ID_TEXTED_BODY 0x1000005c |
393 | #define PSICONV_ID_TEXTED_BODY 0x1000005c |
364 | #define PSICONV_ID_TEXTED_REPLACEMENT 0x10000063 |
394 | #define PSICONV_ID_TEXTED_REPLACEMENT 0x10000063 |
… | |
… | |
420 | extern void psiconv_free_paint_data_section(psiconv_paint_data_section section); |
450 | extern void psiconv_free_paint_data_section(psiconv_paint_data_section section); |
421 | extern void psiconv_free_pictures(psiconv_pictures section); |
451 | extern void psiconv_free_pictures(psiconv_pictures section); |
422 | extern void psiconv_free_mbm_jumptable_section |
452 | extern void psiconv_free_mbm_jumptable_section |
423 | (psiconv_mbm_jumptable_section section); |
453 | (psiconv_mbm_jumptable_section section); |
424 | extern void psiconv_free_mbm_f(psiconv_mbm_f file); |
454 | extern void psiconv_free_mbm_f(psiconv_mbm_f file); |
|
|
455 | extern void psiconv_free_sketch_section(psiconv_sketch_section sec); |
|
|
456 | extern void psiconv_free_sketch_f(psiconv_sketch_f file); |
|
|
457 | |
425 | extern void psiconv_free_file(psiconv_file file); |
458 | extern void psiconv_free_file(psiconv_file file); |
426 | |
459 | |
427 | |
460 | |
428 | #endif /* def PSICONV_DATA_H */ |
461 | #endif /* def PSICONV_DATA_H */ |