8#include <Common/primitive_type.h>
23 int64 m_cropWindowXPx;
24 int64 m_cropWindowYPx;
25 int64 m_cropWindowWPx;
26 int64 m_cropWindowHPx;
31 ClassType clazz(
"frame");
32 clazz.docName(
"Frame Visualizer");
33 clazz.description(
"A visualizer that produces frames, a typical example is an image.");
37 cropWindowXPx.description(
"X coordinate of the lower-left corner of the film cropping window.");
38 cropWindowXPx.defaultTo(0);
39 cropWindowXPx.optional();
40 clazz.addField(cropWindowXPx);
43 cropWindowYPx.
description(
"Y coordinate of the lower-left corner of the film cropping window.");
46 clazz.addField(cropWindowYPx);
49 cropWindowWPx.
description(
"Width of the film cropping window.");
52 clazz.addField(cropWindowWPx);
55 cropWindowHPx.
description(
"Height of the film cropping window.");
58 clazz.addField(cropWindowHPx);
68 if(m_cropWindowXPx == 0 && m_cropWindowYPx == 0 &&
69 m_cropWindowWPx == 0 && m_cropWindowHPx == 0)
76 {m_cropWindowXPx, m_cropWindowYPx},
77 {m_cropWindowXPx + m_cropWindowWPx, m_cropWindowYPx + m_cropWindowHPx});
Definition CoreCookedUnit.h:19
Definition CoreCookingContext.h:15
Definition FrameVisualizer.h:16
void cook(const CoreCookingContext &ctx, CoreCookedUnit &cooked) override=0
std::optional< math::TAABB2D< int64 > > getCropWindowPx() const
Definition FrameVisualizer.h:66
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< FrameVisualizer >)
Definition FrameVisualizer.h:29
A field class that binds a integral member variable.
Definition TSdlInteger.h:21
SDL binding type for a canonical SDL resource class.
Definition TSdlOwnerClass.h:23
TSdlValue & description(std::string descriptionStr)
Definition TSdlValue.ipp:95
TSdlValue & optional()
Definition TSdlValue.ipp:103
TSdlValue & defaultTo(T defaultValue)
Definition TSdlValue.ipp:71
Definition Visualizer.h:10
A 2-D Axis-Aligned Bounding Box (AABB).
Definition TAABB2D.h:26
The root for all renderer implementations.
Definition EEngineProject.h:6