* Get the size of the sprite of an aircraft sprite heading west (used for lists). * @param engine The engine to get the sprite from. * @param[out] width The width of the sprite. * @param[out] height The height of the sprite. * @param[out] xoffs Number of pixels to shift the sprite to the right. * @param[out] yoffs Number of pixels to shift the sprite downwards. * @param image_type Context th
| 245 | * @param image_type Context the sprite is used in. |
| 246 | */ |
| 247 | void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height, int &xoffs, int &yoffs, EngineImageType image_type) |
| 248 | { |
| 249 | VehicleSpriteSeq seq; |
| 250 | GetAircraftIcon(engine, image_type, &seq); |
| 251 | |
| 252 | Rect rect; |
| 253 | seq.GetBounds(&rect); |
| 254 | |
| 255 | width = UnScaleGUI(rect.Width()); |
| 256 | height = UnScaleGUI(rect.Height()); |
| 257 | xoffs = UnScaleGUI(rect.left); |
| 258 | yoffs = UnScaleGUI(rect.top); |
| 259 | } |
| 260 | |
| 261 | /** |
| 262 | * Build an aircraft. |
no test coverage detected