-
Notifications
You must be signed in to change notification settings - Fork 15
/
Leptonica.natvis
68 lines (62 loc) · 2.75 KB
/
Leptonica.natvis
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" MenuName="Add to Image Watch" />
<!-- Leptonica -->
<Type Name="Pix">
<UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" />
</Type>
<Type Name="Pix">
<DisplayString>{{{spp}({(d+7)/8}) x {w} x {h}}}</DisplayString>
<Expand>
<!--struct Pix
{
l_uint32 w; /*!< width in pixels */
l_uint32 h; /*!< height in pixels */
l_uint32 d; /*!< depth in bits (bpp) */
l_uint32 spp; /*!< number of samples per pixel */
l_uint32 wpl; /*!< 32-bit words/line */
l_uint32 refcount; /*!< reference count (1 if no clones) */
l_int32 xres; /*!< image res (ppi) in x direction */
/*!< (use 0 if unknown) */
l_int32 yres; /*!< image res (ppi) in y direction */
/*!< (use 0 if unknown) */
l_int32 informat; /*!< input file format, IFF_* */
l_int32 special; /*!< special instructions for I/O, etc */
char *text; /*!< text string associated with pix */
struct PixColormap *colormap; /*!< colormap (may be null) */
l_uint32 *data; /*!< the image data */
};-->
<Synthetic Name="[type]">
<DisplayString>UINT8</DisplayString>
</Synthetic>
<Synthetic Name="[channels]">
<DisplayString Condition="d<=8">1</DisplayString>
<DisplayString Condition="d==24">RGB</DisplayString>
<DisplayString>{d/8}</DisplayString>
</Synthetic>
<Synthetic Name="[width]">
<DisplayString Condition="d<=8">{(w * d + 7) / 8}</DisplayString>
<DisplayString>{w}</DisplayString>
</Synthetic>
<Item Name="[height]">h</Item>
<Item Name="[stride]">wpl * 4</Item>
<Item Name="[data]">data</Item>
</Expand>
</Type>
<Type Name="Pixa">
<DisplayString>{{{n} blocks}}</DisplayString>
<Expand>
<CustomListItems>
<Variable Name="i" InitialValue="0" />
<Loop>
<If Condition="i >= n">
<Break />
</If>
<Item Name="[pix {i}]">pix[i]</Item>
<Item Name="[box array {i}]">boxa[i]</Item>
<Exec>i++</Exec>
</Loop>
</CustomListItems>
</Expand>
</Type>
</AutoVisualizer>