Rerun C++ SDK
Loading...
Searching...
No Matches
view_fit.hpp
1// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
2// Based on "crates/store/re_types/definitions/rerun/blueprint/components/view_fit.fbs".
3
4#pragma once
5
6#include "../../component_descriptor.hpp"
7#include "../../result.hpp"
8
9#include <cstdint>
10#include <memory>
11
12namespace arrow {
13 /// \private
14 template <typename T>
15 class NumericBuilder;
16
17 class Array;
18 class DataType;
19 class UInt8Type;
20 using UInt8Builder = NumericBuilder<UInt8Type>;
21} // namespace arrow
22
23namespace rerun::blueprint::components {
24 /// **Component**: Determines whether an image or texture should be scaled to fit the viewport.
25 enum class ViewFit : uint8_t {
26
27 /// No scaling, pixel size will match the image's width/height dimensions in pixels.
28 Original = 1,
29
30 /// Scale the image for the largest possible fit in the view's container.
31 Fill = 2,
32
33 /// Scale the image for the largest possible fit in the view's container, but keep the original aspect ratio.
34 FillKeepAspectRatio = 3,
35 };
36} // namespace rerun::blueprint::components
37
38namespace rerun {
39 template <typename T>
40 struct Loggable;
41
42 /// \private
43 template <>
44 struct Loggable<blueprint::components::ViewFit> {
45 static constexpr ComponentDescriptor Descriptor = "rerun.blueprint.components.ViewFit";
46
47 /// Returns the arrow data type this type corresponds to.
48 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
49
50 /// Serializes an array of `rerun::blueprint:: components::ViewFit` into an arrow array.
51 static Result<std::shared_ptr<arrow::Array>> to_arrow(
52 const blueprint::components::ViewFit* instances, size_t num_instances
53 );
54
55 /// Fills an arrow array builder with an array of this type.
56 static rerun::Error fill_arrow_array_builder(
57 arrow::UInt8Builder* builder, const blueprint::components::ViewFit* elements,
58 size_t num_elements
59 );
60 };
61} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:95
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23