> For the complete documentation index, see [llms.txt](https://cavonstavants-organization.gitbook.io/rtype-technical-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cavonstavants-organization.gitbook.io/rtype-technical-documentation/index_files/_size_8hpp.md).

# Size.hpp

## Namespaces

| Name                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------------------------------------- |
| [**ecs**](https://github.com/TEAM-AAAAAAAAAAAAAAAA/RTYPE-TECHNICAL-DOCS/blob/main/Files/Namespaces/namespaceecs.md)                         |
| [**ecs::component**](https://github.com/TEAM-AAAAAAAAAAAAAAAA/RTYPE-TECHNICAL-DOCS/blob/main/Files/Namespaces/namespaceecs_1_1component.md) |

## Classes

|        | Name                                                                                                                                                                                                                                                                          |
| ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| struct | <p><a href="https://github.com/TEAM-AAAAAAAAAAAAAAAA/RTYPE-TECHNICAL-DOCS/blob/main/Files/Classes/structecs_1_1component_1_1_size.md"><strong>ecs::component::Size</strong></a><br><a href="/rtype-technical-documentation/index_files/_size_8hpp.md">Size</a> component.</p> |

## Source code

```cpp
#pragma once

namespace ecs::component
{
    struct Size {
        int height;
        int width;
        std::array<char, 4> serialize()
        {
            std::array<char, 4> pos;
            size_t tmp = 0;

            tmp = width >> 8;
            pos[0] = tmp;
            pos[1] = width & 0xff;
            tmp = height >> 8;
            pos[2] = tmp;
            pos[3] = height & 0xff;
            return pos;
        }
    };
} // namespace ecs::component
```

***

Updated on 2022-11-13 at 17:21:37 +0100
