OBD:PSpc: Difference between revisions
Jump to navigation
Jump to search
(added explanation) |
m (missed this one) |
||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{OBD_File_Header | type=PSpc | prev=PNTA | next=PSpL | name=Part Specification | family= | {{OBD_File_Header | type=PSpc | prev=PNTA | next=PSpL | name=Part Specification | family=Interface | align=center}} | ||
[[ | [[Image:pspc_all.gif]] | ||
Line 9: | Line 9: | ||
{{OBDtr| 0x00 | res_id |FF0000| 01 39 00 00 | 57 | 00057-level_3_part.PSpc }} | {{OBDtr| 0x00 | res_id |FF0000| 01 39 00 00 | 57 | 00057-level_3_part.PSpc }} | ||
{{OBDtr| 0x04 | lev_id |FFFF00| 01 00 00 06 | 3 | level 3 }} | {{OBDtr| 0x04 | lev_id |FFFF00| 01 00 00 06 | 3 | level 3 }} | ||
{{OBDtr| 0x08 | int16 |FFC8C8| 00 00 | 0 | x-coordinate of | {{OBDtr| 0x08 | int16 |FFC8C8| 00 00 | 0 | x-coordinate of top left corner of top left rectangle }} | ||
{{OBDtr| ... | ... |FFC8C8| ... | ... | ... }} | {{OBDtr| ... | ... |FFC8C8| ... | ... | ... }} | ||
{{OBDtr| 0x4E | int16 |FFC8C8| 00 00 | 0 | y-coordinate of | {{OBDtr| 0x4E | int16 |FFC8C8| 00 00 | 0 | y-coordinate of bottom right corner of bottom right rectangle }} | ||
{{OBDtr| 0x50 | link |FFFFC8| 01 38 00 00 | 0 | link to 00056-h_03.[[OBD:TXMP|TXMP]] }} | {{OBDtr| 0x50 | link |FFFFC8| 01 38 00 00 | 0 | link to 00056-h_03.[[OBD:TXMP|TXMP]] }} | ||
{{OBDtr| 0x54 | char[12] |C8FFC8| AD DE | dead | unused }} | {{OBDtr| 0x54 | char[12] |C8FFC8| AD DE | dead | unused }} | ||
Line 17: | Line 17: | ||
:''For a visualization of nine-slice rendering, see [https://learn.microsoft.com/en-us/previous-versions/windows/desktop/windows-media-center-sdk/bb189722(v=msdn.10) HERE] or [[XML:PSpc]]. | |||
;What | ;What is stored | ||
:There are 9 rectangles | :There are 9 rectangles defined in PSpc: 4 corners, 4 sides and one interior rectangle. Typically all 9 are used (to draw buttons for example) or only one is used (the top left corner, to draw checkboxes for example). There are cases where the top left corner and the interior rectangle are both present, which indicates that the code can choose which part to draw. | ||
:The reason for using 9 rectangles is to allow drawing of buttons (and anything else that has | :The reason for using 9 rectangles is to allow drawing of buttons (and anything else that has defined corners) in various sizes without distorting the corners. | ||
:*the corners are never rescaled | :*the corners are never rescaled | ||
:*horizontal sides can be stretched horizontally | :*horizontal sides can be stretched horizontally | ||
:*vertical sides can be stretched vertically | :*vertical sides can be stretched vertically | ||
:*the interior can be stretched both ways | :*the interior can be stretched both ways | ||
:Of course that means that the sides and the interior must be | :Of course that means that the sides and the interior must be specially designed to be stretchable without visible distortion. | ||
;How it is stored | ;How it is stored | ||
: | :A pair of int16 fields make a texture coordinate. The first 9 texture coordinates in the file (18 bytes) are the top-left corners of the 9 rectangles. The latter 9 coordinates are the bottom-right corners of the 9 rectangles. When both coordinates are 0 then the rectangle is not used. The order of the coordinates is top to bottom, left to right. Thus the order of the 9 rectangles is: top left, top center, top right, middle left, middle center, middle right, bottom left, bottom center, bottom right. | ||
{{OBD_File_Footer | type=PSpc | prev=PNTA | next=PSpL | name=Part Specification | family= | |||
{{OBD_File_Footer | type=PSpc | prev=PNTA | next=PSpL | name=Part Specification | family=Interface}} | |||
{{OBD}} |
Latest revision as of 01:39, 7 December 2023
|
Offset | Type | Raw Hex | Value | Description |
---|---|---|---|---|
0x00 | res_id | 01 39 00 00 | 57 | 00057-level_3_part.PSpc |
0x04 | lev_id | 01 00 00 06 | 3 | level 3 |
0x08 | int16 | 00 00 | 0 | x-coordinate of top left corner of top left rectangle |
... | ... | ... | ... | ... |
0x4E | int16 | 00 00 | 0 | y-coordinate of bottom right corner of bottom right rectangle |
0x50 | link | 01 38 00 00 | 0 | link to 00056-h_03.TXMP |
0x54 | char[12] | AD DE | dead | unused |
- What is stored
- There are 9 rectangles defined in PSpc: 4 corners, 4 sides and one interior rectangle. Typically all 9 are used (to draw buttons for example) or only one is used (the top left corner, to draw checkboxes for example). There are cases where the top left corner and the interior rectangle are both present, which indicates that the code can choose which part to draw.
- The reason for using 9 rectangles is to allow drawing of buttons (and anything else that has defined corners) in various sizes without distorting the corners.
- the corners are never rescaled
- horizontal sides can be stretched horizontally
- vertical sides can be stretched vertically
- the interior can be stretched both ways
- Of course that means that the sides and the interior must be specially designed to be stretchable without visible distortion.
- How it is stored
- A pair of int16 fields make a texture coordinate. The first 9 texture coordinates in the file (18 bytes) are the top-left corners of the 9 rectangles. The latter 9 coordinates are the bottom-right corners of the 9 rectangles. When both coordinates are 0 then the rectangle is not used. The order of the coordinates is top to bottom, left to right. Thus the order of the 9 rectangles is: top left, top center, top right, middle left, middle center, middle right, bottom left, bottom center, bottom right.
ONI BINARY DATA |
---|
PNTA << Other file types >> PSpL |
PSpc : Part Specification |
Interface file |