chore(stdlib): update xod/graphics

This commit is contained in:
Kirill Shumilov
2020-08-21 17:00:32 +03:00
committed by Evgeny Kochetkov
parent 7f8339031c
commit 090cc95f2b
38 changed files with 879 additions and 1196 deletions

View File

@@ -1,16 +1,8 @@
// clang-format off
{{#global}}
#include <Bitmap.h>
{{/global}}
// clang-format on
struct State {};
using Type = Bitmap*;
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {}
node {
meta {
using Type = Bitmap*;
}
void evaluate(Context ctx) {}
}

View File

@@ -1,43 +1,31 @@
// clang-format off
{{#global}}
#include <Canvas.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(Canvas)];
Canvas* canvas;
int16_t x, y, w, h;
};
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto bgColor = getValue<input_BG>(ctx);
auto fgColor = getValue<input_FG>(ctx);
void evaluate(Context ctx) {
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t w = (int16_t)getValue<input_W>(ctx);
int16_t h = (int16_t)getValue<input_H>(ctx);
auto state = getState(ctx);
if (isSettingUp()) {
canvas = new (mem) Canvas();
}
auto bgColor = getValue<input_BG>(ctx);
auto fgColor = getValue<input_FG>(ctx);
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t w = (int16_t)getValue<input_W>(ctx);
int16_t h = (int16_t)getValue<input_H>(ctx);
if (isSettingUp()) {
state->canvas = new (state->mem) Canvas();
}
if (isSettingUp() || x != state->x || y != state->y || w != state->w || h != state->h || isInputDirty<input_BG>(ctx) || isInputDirty<input_FG>(ctx)) {
state->x = x;
state->y = y;
state->w = w;
state->h = h;
state->canvas->setPosition(x, y, w, h);
state->canvas->setStyle(bgColor, fgColor);
emitValue<output_GFX>(ctx, state->canvas);
if (isSettingUp() || x != x || y != y || w != w || h != h || isInputDirty<input_BG>(ctx) || isInputDirty<input_FG>(ctx)) {
x = x;
y = y;
w = w;
h = h;
canvas->setPosition(x, y, w, h);
canvas->setStyle(bgColor, fgColor);
emitValue<output_GFX>(ctx, canvas);
}
}
}

View File

@@ -1,45 +1,35 @@
// clang-format off
{{#global}}
#include <Circle.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(CircleOutline)];
CircleOutline* circleOutlineColored;
int16_t x, y, r;
XColor strokeColor;
};
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
strokeColor = getValue<input_C>(ctx);
void evaluate(Context ctx) {
auto state = getState(ctx);
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t r = (int16_t)getValue<input_R>(ctx);
auto gfx = getValue<input_GFX>(ctx);
state->strokeColor = getValue<input_C>(ctx);
if (isSettingUp()) {
circleOutlineColored = new (mem) CircleOutline(gfx);
}
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t r = (int16_t)getValue<input_R>(ctx);
if (isSettingUp() || x != x || y != y || r != r || isInputDirty<input_C>(ctx)) {
x = x;
y = y;
r = r;
circleOutlineColored->setPosition(x, y, r);
circleOutlineColored->setStyle(&strokeColor);
emitValue<output_GFXU0027>(ctx, circleOutlineColored);
}
if (isSettingUp()) {
state->circleOutlineColored = new (state->mem) CircleOutline(gfx);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, circleOutlineColored);
}
}
if (isSettingUp() || x != state->x || y != state->y || r != state->r || isInputDirty<input_C>(ctx)) {
state->x = x;
state->y = y;
state->r = r;
state->circleOutlineColored->setPosition(x, y, r);
state->circleOutlineColored->setStyle(&state->strokeColor);
emitValue<output_GFXU0027>(ctx, state->circleOutlineColored);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->circleOutlineColored);
}
}

View File

@@ -1,42 +1,31 @@
// clang-format off
{{#global}}
#include <Circle.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(CircleOutline)];
CircleOutline* circleOutline;
int16_t x, y, r;
};
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
void evaluate(Context ctx) {
auto state = getState(ctx);
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t r = (int16_t)getValue<input_R>(ctx);
auto gfx = getValue<input_GFX>(ctx);
if (isSettingUp()) {
circleOutline = new (mem) CircleOutline(gfx);
}
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t r = (int16_t)getValue<input_R>(ctx);
if (isSettingUp() || x != x || y != y || r != r) {
x = x;
y = y;
r = r;
circleOutline->setPosition(x, y, r);
emitValue<output_GFXU0027>(ctx, circleOutline);
}
if (isSettingUp()) {
state->circleOutline = new (state->mem) CircleOutline(gfx);
}
if (isSettingUp() || x != state->x || y != state->y || r != state->r) {
state->x = x;
state->y = y;
state->r = r;
state->circleOutline->setPosition(x, y, r);
emitValue<output_GFXU0027>(ctx, state->circleOutline);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->circleOutline);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, circleOutline);
}
}
}

View File

@@ -1,45 +1,35 @@
// clang-format off
{{#global}}
#include <Circle.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(CircleSolid)];
CircleSolid* circleSolidColored;
int16_t x, y, r;
XColor fillColor;
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
fillColor = getValue<input_C>(ctx);
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t r = (int16_t)getValue<input_R>(ctx);
if (isSettingUp()) {
circleSolidColored = new (mem) CircleSolid(gfx);
}
if (isSettingUp() || x != x || y != y || r != r || isInputDirty<input_C>(ctx)) {
x = x;
y = y;
r = r;
circleSolidColored->setPosition(x, y, r);
circleSolidColored->setStyle(&fillColor);
emitValue<output_GFXU0027>(ctx, circleSolidColored);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, circleSolidColored);
}
}
};
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto state = getState(ctx);
auto gfx = getValue<input_GFX>(ctx);
state->fillColor = getValue<input_C>(ctx);
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t r = (int16_t)getValue<input_R>(ctx);
if (isSettingUp()) {
state->circleSolidColored = new (state->mem) CircleSolid(gfx);
}
if (isSettingUp() || x != state->x || y != state->y || r != state->r || isInputDirty<input_C>(ctx)) {
state->x = x;
state->y = y;
state->r = r;
state->circleSolidColored->setPosition(x, y, r);
state->circleSolidColored->setStyle(&state->fillColor);
emitValue<output_GFXU0027>(ctx, state->circleSolidColored);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->circleSolidColored);
}
}

View File

@@ -1,42 +1,31 @@
// clang-format off
{{#global}}
#include <Circle.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(CircleSolid)];
CircleSolid* circleSolid;
int16_t x, y, r;
int16_t _x, _y, _r;
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t r = (int16_t)getValue<input_R>(ctx);
if (isSettingUp()) {
circleSolid = new (mem) CircleSolid(gfx);
}
if (isSettingUp() || x != _x || y != _y || r != _r) {
_x = x;
_y = y;
_r = r;
circleSolid->setPosition(x, y, r);
emitValue<output_GFXU0027>(ctx, circleSolid);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, circleSolid);
}
}
};
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto state = getState(ctx);
auto gfx = getValue<input_GFX>(ctx);
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t r = (int16_t)getValue<input_R>(ctx);
if (isSettingUp()) {
state->circleSolid = new (state->mem) CircleSolid(gfx);
}
if (isSettingUp() || x != state->x || y != state->y || r != state->r) {
state->x = x;
state->y = y;
state->r = r;
state->circleSolid->setPosition(x, y, r);
emitValue<output_GFXU0027>(ctx, state->circleSolid);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->circleSolid);
}
}

View File

@@ -1,16 +1,9 @@
// clang-format off
{{#global}}
#include <XGraphics.h>
{{/global}}
// clang-format on
struct State {};
node {
meta {
using Type = XGraphics*;
}
using Type = XGraphics*;
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {}
void evaluate(Context ctx) {}
}

View File

@@ -1,34 +1,29 @@
nodespace {
static const unsigned char icon[] PROGMEM = {
static const unsigned char icon[] PROGMEM = {
0b00000000, 0b00000000, //
0b00000000, 0b00000000, //
0b00111100, 0b01111000, // #### ####
0b01111110, 0b11111100, // ###### ######
0b11111111, 0b11111110, // ###############
0b11111111, 0b11111110, // ###############
0b11111111, 0b11111110, // ###############
0b11111111, 0b11111110, // ###############
0b01111111, 0b11111100, // #############
0b01111111, 0b11111100, // #############
0b00111111, 0b11111000, // ###########
0b00011111, 0b11110000, // #########
0b00001111, 0b11100000, // #######
0b00000111, 0b11000000, // #####
0b00000011, 0b10000000, // ###
0b00000001, 0b00000000, // #
0b00000000, 0b00000000, //
0b00000000, 0b00000000, //
0b00111100, 0b01111000, // #### ####
0b01111110, 0b11111100, // ###### ######
0b11111111, 0b11111110, // ###############
0b11111111, 0b11111110, // ###############
0b11111111, 0b11111110, // ###############
0b11111111, 0b11111110, // ###############
0b01111111, 0b11111100, // #############
0b01111111, 0b11111100, // #############
0b00111111, 0b11111000, // ###########
0b00011111, 0b11110000, // #########
0b00001111, 0b11100000, // #######
0b00000111, 0b11000000, // #####
0b00000011, 0b10000000, // ###
0b00000001, 0b00000000, // #
};
struct State {
uint8_t mem[sizeof(Bitmap)];
Bitmap* myBitmap;
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto state = getState(ctx);
state->myBitmap = new (state->mem) Bitmap(icon, 0, 16, 16);
emitValue<output_BMP>(ctx, state->myBitmap);
};
}
node {
Bitmap myBitmap = Bitmap(icon, 0, 16, 16);
void evaluate(Context ctx) {
emitValue<output_BMP>(ctx, &myBitmap);
}
}

View File

@@ -1,34 +1,29 @@
nodespace {
static const unsigned char icon[] PROGMEM = {
static const unsigned char icon[] PROGMEM = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x03,0xd8,0x03,0xc0,0x03,0x00,0x00,0x00,0x00,0xc0,0x02,0xd8,0x03,0xc0,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x86,0xe1,0x28,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xe0,0x04,0xe0,0x04,0xe0,0x04,0xe0,0x03,0xe0,0x03,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x98,0x02,0xea,0x8d,0xe0,0x87,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xe0,0x03,0x98,0x02,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0xa8,0x02,0xea,0xae,0xe0,0x06,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xe0,0x03,0xa0,0x02,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x88,0x02,0xe1,0x69,0xe0,0x26,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xe0,0x04,0xd0,0x03,0x80,0x01,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x24,0xe0,0xa7,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xd8,0x03,0xc0,0x22,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd8,0x03,0xe0,0x04,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xd8,0x03,0xc0,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd8,0x03,0xd8,0x04,0xd8,0x04,0xd0,0x03,0xc8,0x03,0xc0,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x02,0xc0,0x23,0xc0,0x23,0xb8,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x22,0x90,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x03,0xd8,0x03,0xc0,0x03,0x00,0x00,0x00,0x00,0xc0,0x02,0xd8,0x03,0xc0,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x86,0xe1,0x28,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xe0,0x04,0xe0,0x04,0xe0,0x04,0xe0,0x03,0xe0,0x03,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x98,0x02,0xea,0x8d,0xe0,0x87,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xe0,0x03,0x98,0x02,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0xa8,0x02,0xea,0xae,0xe0,0x06,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xe0,0x03,0xa0,0x02,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x88,0x02,0xe1,0x69,0xe0,0x26,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xe0,0x04,0xd0,0x03,0x80,0x01,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x24,0xe0,0xa7,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xd8,0x03,0xc0,0x22,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd8,0x03,0xe0,0x04,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xd8,0x03,0xc0,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd8,0x03,0xd8,0x04,0xd8,0x04,0xd0,0x03,0xc8,0x03,0xc0,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x02,0xc0,0x23,0xc0,0x23,0xb8,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x22,0x90,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
struct State {
uint8_t mem[sizeof(Bitmap)];
Bitmap* myBitmap;
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto state = getState(ctx);
state->myBitmap = new (state->mem) Bitmap(icon, 1, 16, 16);
emitValue<output_BMP>(ctx, state->myBitmap);
};
}
node {
Bitmap myBitmap = Bitmap(icon, 1, 16, 16);
void evaluate(Context ctx) {
emitValue<output_BMP>(ctx, &myBitmap);
}
}

View File

@@ -1,34 +1,30 @@
nodespace {
static const unsigned char icon[] PROGMEM = {
static const unsigned char icon[] PROGMEM = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x03,0xd8,0x03,0xc0,0x03,0x00,0x00,0x00,0x00,0xc0,0x02,0xd8,0x03,0xc0,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x86,0xe1,0x28,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xe0,0x04,0xe0,0x04,0xe0,0x04,0xe0,0x03,0xe0,0x03,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x98,0x02,0xea,0x8d,0xe0,0x87,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xe0,0x03,0x98,0x02,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0xa8,0x02,0xea,0xae,0xe0,0x06,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xe0,0x03,0xa0,0x02,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x88,0x02,0xe1,0x69,0xe0,0x26,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xe0,0x04,0xd0,0x03,0x80,0x01,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x24,0xe0,0xa7,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xd8,0x03,0xc0,0x22,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd8,0x03,0xe0,0x04,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xd8,0x03,0xc0,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd8,0x03,0xd8,0x04,0xd8,0x04,0xd0,0x03,0xc8,0x03,0xc0,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x02,0xc0,0x23,0xc0,0x23,0xb8,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x22,0x90,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
}
node {
Bitmap myBitmap = Bitmap(icon, 2, 16, 16, 0x0000);
void evaluate(Context ctx) {
emitValue<output_BMP>(ctx, &myBitmap);
}
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x03,0xd8,0x03,0xc0,0x03,0x00,0x00,0x00,0x00,0xc0,0x02,0xd8,0x03,0xc0,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x86,0xe1,0x28,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xe0,0x04,0xe0,0x04,0xe0,0x04,0xe0,0x03,0xe0,0x03,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x98,0x02,0xea,0x8d,0xe0,0x87,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xe0,0x03,0x98,0x02,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0xa8,0x02,0xea,0xae,0xe0,0x06,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xe0,0x03,0xa0,0x02,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x88,0x02,0xe1,0x69,0xe0,0x26,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xe0,0x04,0xd0,0x03,0x80,0x01,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x24,0xe0,0xa7,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xd8,0x03,0xc0,0x22,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd8,0x03,0xe0,0x04,0xe0,0x05,0xe0,0x05,0xe0,0x04,0xe0,0x04,0xd8,0x03,0xc0,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd8,0x03,0xd8,0x04,0xd8,0x04,0xd0,0x03,0xc8,0x03,0xc0,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x02,0xc0,0x23,0xc0,0x23,0xb8,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x22,0x90,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
struct State {
uint8_t mem[sizeof(Bitmap)];
Bitmap* myBitmap;
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto state = getState(ctx);
state->myBitmap = new (state->mem) Bitmap(icon, 2, 16, 16, 0x0000);
emitValue<output_BMP>(ctx, state->myBitmap);
}

View File

@@ -1,34 +1,29 @@
nodespace {
static const unsigned char icon[] PROGMEM = {
static const unsigned char icon[] PROGMEM = {
0b00000000, 0b00000000, //
0b00000001, 0b10000000, // ##
0b00000011, 0b11000000, // ####
0b00000111, 0b11100000, // ######
0b00001111, 0b11110000, // ########
0b00001111, 0b11110000, // ########
0b00011111, 0b11111000, // ##########
0b00011111, 0b11011000, // ####### ##
0b00111111, 0b10011100, // ####### ###
0b00111111, 0b10011100, // ####### ###
0b00111111, 0b00011100, // ###### ###
0b00011110, 0b00111000, // #### ###
0b00011111, 0b11111000, // ##########
0b00001111, 0b11110000, // ########
0b00000011, 0b11000000, // ####
0b00000000, 0b00000000, //
0b00000000, 0b00000000, //
0b00000001, 0b10000000, // ##
0b00000011, 0b11000000, // ####
0b00000111, 0b11100000, // ######
0b00001111, 0b11110000, // ########
0b00001111, 0b11110000, // ########
0b00011111, 0b11111000, // ##########
0b00011111, 0b11011000, // ####### ##
0b00111111, 0b10011100, // ####### ###
0b00111111, 0b10011100, // ####### ###
0b00111111, 0b00011100, // ###### ###
0b00011110, 0b00111000, // #### ###
0b00011111, 0b11111000, // ##########
0b00001111, 0b11110000, // ########
0b00000011, 0b11000000, // ####
0b00000000, 0b00000000, //
};
struct State {
uint8_t mem[sizeof(Bitmap)];
Bitmap* myBitmap;
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto state = getState(ctx);
state->myBitmap = new (state->mem) Bitmap(icon, 0, 16, 16);
emitValue<output_BMP>(ctx, state->myBitmap);
};
}
node {
Bitmap myBitmap = Bitmap(icon, 0, 16, 16);
void evaluate(Context ctx) {
emitValue<output_BMP>(ctx, &myBitmap);
}
}

View File

@@ -1,34 +1,29 @@
nodespace {
static const unsigned char icon[] PROGMEM = {
static const unsigned char icon[] PROGMEM = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0xf3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xd7,0x35,0xbc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xd7,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2d,0x39,0x23,0xf3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x2c,0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x35,0xdc,0x35,0x9b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xd8,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x2d,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0xd3,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x2d,0x5a,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x2c,0xb7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x2d,0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xd7,0x56,0x3d,0x4e,0x1c,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x2c,0xd7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3d,0xdc,0x76,0x7d,0x3d,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0x7b,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0xf3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xd7,0x35,0xbc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xd7,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2d,0x39,0x23,0xf3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x2c,0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x35,0xdc,0x35,0x9b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xd8,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x2d,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0xd3,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x2d,0x5a,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x2c,0xb7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x2d,0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xd7,0x56,0x3d,0x4e,0x1c,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x2c,0xd7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3d,0xdc,0x76,0x7d,0x3d,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0x7b,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
struct State {
uint8_t mem[sizeof(Bitmap)];
Bitmap* myBitmap;
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto state = getState(ctx);
state->myBitmap = new (state->mem) Bitmap(icon, 1, 16, 16);
emitValue<output_BMP>(ctx, state->myBitmap);
};
}
node {
Bitmap myBitmap = Bitmap(icon, 1, 16, 16);
void evaluate(Context ctx) {
emitValue<output_BMP>(ctx, &myBitmap);
}
}

View File

@@ -1,34 +1,29 @@
nodespace {
static const unsigned char icon[] PROGMEM = {
static const unsigned char icon[] PROGMEM = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0xf3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xd7,0x35,0xbc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xd7,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2d,0x39,0x23,0xf3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x2c,0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x35,0xdc,0x35,0x9b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xd8,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x2d,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0xd3,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x2d,0x5a,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x2c,0xb7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x2d,0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xd7,0x56,0x3d,0x4e,0x1c,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x2c,0xd7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3d,0xdc,0x76,0x7d,0x3d,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0x7b,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0xf3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xd7,0x35,0xbc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xd7,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2d,0x39,0x23,0xf3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x2c,0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x35,0xdc,0x35,0x9b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xd8,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x2d,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0xd3,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x2d,0x5a,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x2c,0xb7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x2d,0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0xd7,0x56,0x3d,0x4e,0x1c,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x2c,0xd7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3d,0xdc,0x76,0x7d,0x3d,0xdc,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0x7b,0x35,0xdc,0x35,0xdc,0x35,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
struct State {
uint8_t mem[sizeof(Bitmap)];
Bitmap* myBitmap;
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto state = getState(ctx);
state->myBitmap = new (state->mem) Bitmap(icon, 2, 16, 16, 0x0000);
emitValue<output_BMP>(ctx, state->myBitmap);
};
}
node {
Bitmap myBitmap = Bitmap(icon, 2, 16, 16 0x0000);
void evaluate(Context ctx) {
emitValue<output_BMP>(ctx, &myBitmap);
}
}

View File

@@ -1,46 +1,35 @@
// clang-format off
{{#global}}
#include <Image.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(Image)];
Image* image;
int16_t x, y, w, h;
};
int16_t _x, _y, _w, _h;
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
auto bitmap = getValue<input_BMP>(ctx);
void evaluate(Context ctx) {
auto state = getState(ctx);
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t w = (int16_t)getValue<input_W>(ctx);
int16_t h = (int16_t)getValue<input_H>(ctx);
auto gfx = getValue<input_GFX>(ctx);
auto bitmap = getValue<input_BMP>(ctx);
if (isSettingUp()) {
image = new (mem) Image(gfx);
}
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t w = (int16_t)getValue<input_W>(ctx);
int16_t h = (int16_t)getValue<input_H>(ctx);
if (isSettingUp() || x != _x || y != _y || w != _w || h != _h || isInputDirty<input_BMP>(ctx)) {
_x = x;
_y = y;
_w = w;
_h = h;
image->linkBitmap(bitmap);
image->setImagePosition(x, y, w, h);
emitValue<output_GFXU0027>(ctx, image);
}
if (isSettingUp()) {
state->image = new (state->mem) Image(gfx);
}
if (isSettingUp() || x != state->x || y != state->y || w != state->w || h != state->h || isInputDirty<input_BMP>(ctx)) {
state->x = x;
state->y = y;
state->w = w;
state->h = h;
state->image->linkBitmap(bitmap);
state->image->setImagePosition(x, y, w, h);
emitValue<output_GFXU0027>(ctx, state->image);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->image);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, image);
}
}
}

View File

@@ -1,47 +1,35 @@
// clang-format off
{{#global}}
#include <Line.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(Line)];
Line* lineColored;
int16_t x0, y0, x1, y1;
int16_t _x0, _y0, _x1, _y1;
XColor strokeColor;
};
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
strokeColor = getValue<input_C>(ctx);
void evaluate(Context ctx) {
auto state = getState(ctx);
int16_t x0 = (int16_t)getValue<input_X0>(ctx);
int16_t y0 = (int16_t)getValue<input_Y0>(ctx);
int16_t x1 = (int16_t)getValue<input_X1>(ctx);
int16_t y1 = (int16_t)getValue<input_Y1>(ctx);
auto gfx = getValue<input_GFX>(ctx);
state->strokeColor = getValue<input_C>(ctx);
if (isSettingUp()) {
lineColored = new (mem) Line(gfx);
}
int16_t x0 = (int16_t)getValue<input_X0>(ctx);
int16_t y0 = (int16_t)getValue<input_Y0>(ctx);
int16_t x1 = (int16_t)getValue<input_X1>(ctx);
int16_t y1 = (int16_t)getValue<input_Y1>(ctx);
if (isSettingUp() || x0 != _x0 || y0 != _y0 || x1 != _x1 || y1 != _y1 || isInputDirty<input_C>(ctx)) {
_x0 = x0;
_y0 = y0;
_x1 = x1;
_y1 = y1;
lineColored->setPosition(x0, y0, x1, y1);
lineColored->setStyle(&strokeColor);
emitValue<output_GFXU0027>(ctx, lineColored);
}
if (isSettingUp()) {
state->lineColored = new (state->mem) Line(gfx);
}
if (isSettingUp() || x0 != state->x0 || y0 != state->y0 || x1 != state->x1 || y1 != state->y1 || isInputDirty<input_C>(ctx)) {
state->x0 = x0;
state->y0 = y0;
state->x1 = x1;
state->y1 = y1;
state->lineColored->setPosition(x0, y0, x1, y1);
state->lineColored->setStyle(&state->strokeColor);
emitValue<output_GFXU0027>(ctx, state->lineColored);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->lineColored);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, lineColored);
}
}
}

View File

@@ -1,44 +1,33 @@
// clang-format off
{{#global}}
#include <Line.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(Line)];
Line* line;
int16_t x0, y0, x1, y1;
};
int16_t _x0, _y0, _x1, _y1;
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
void evaluate(Context ctx) {
auto state = getState(ctx);
int16_t x0 = (int16_t)getValue<input_X0>(ctx);
int16_t y0 = (int16_t)getValue<input_Y0>(ctx);
int16_t x1 = (int16_t)getValue<input_X1>(ctx);
int16_t y1 = (int16_t)getValue<input_Y1>(ctx);
auto gfx = getValue<input_GFX>(ctx);
if (isSettingUp()) {
line = new (mem) Line(gfx);
}
int16_t x0 = (int16_t)getValue<input_X0>(ctx);
int16_t y0 = (int16_t)getValue<input_Y0>(ctx);
int16_t x1 = (int16_t)getValue<input_X1>(ctx);
int16_t y1 = (int16_t)getValue<input_Y1>(ctx);
if (isSettingUp() || x0 != _x0 || y0 != _y0 || x1 != _x1 || y1 != _y1) {
_x0 = x0;
_y0 = y0;
_x1 = x1;
_y1 = y1;
line->setPosition(x0, y0, x1, y1);
emitValue<output_GFXU0027>(ctx, line);
}
if (isSettingUp()) {
state->line = new (state->mem) Line(gfx);
}
if (isSettingUp() || x0 != state->x0 || y0 != state->y0 || x1 != state->x1 || y1 != state->y1) {
state->x0 = x0;
state->y0 = y0;
state->x1 = x1;
state->y1 = y1;
state->line->setPosition(x0, y0, x1, y1);
emitValue<output_GFXU0027>(ctx, state->line);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->line);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, line);
}
}
}

View File

@@ -1,44 +1,32 @@
// clang-format off
{{#global}}
#include <Point.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(Point)];
Point* pointColored;
int16_t x, y;
int16_t _x, _y;
XColor strokeColor;
};
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
void evaluate(Context ctx) {
strokeColor = getValue<input_C>(ctx);
auto state = getState(ctx);
auto gfx = getValue<input_GFX>(ctx);
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
state->strokeColor = getValue<input_C>(ctx);
if (isSettingUp()) {
pointColored = new (mem) Point(gfx);
}
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
if (isSettingUp() || x != _x || y != _y || isInputDirty<input_C>(ctx)) {
_x = x;
_y = y;
pointColored->setPosition(x, y);
pointColored->setStyle(&strokeColor);
emitValue<output_GFXU0027>(ctx, pointColored);
}
if (isSettingUp()) {
state->pointColored = new (state->mem) Point(gfx);
}
if (isSettingUp() || state->x != x || state->y != y || isInputDirty<input_C>(ctx)) {
state->x = x;
state->y = y;
state->pointColored->setPosition(x, y);
state->pointColored->setStyle(&state->strokeColor);
emitValue<output_GFXU0027>(ctx, state->pointColored);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->pointColored);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, pointColored);
}
}
}

View File

@@ -1,40 +1,29 @@
// clang-format off
{{#global}}
#include <Point.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(Point)];
Point* point;
int16_t x, y;
};
int16_t _x, _y;
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
void evaluate(Context ctx) {
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
auto state = getState(ctx);
auto gfx = getValue<input_GFX>(ctx);
if (isSettingUp()) {
point = new (mem) Point(gfx);
}
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
if (isSettingUp() || x != _x || y != _y) {
_x = x;
_y = y;
point->setPosition(x, y);
emitValue<output_GFXU0027>(ctx, point);
}
if (isSettingUp()) {
state->point = new (state->mem) Point(gfx);
}
if (isSettingUp() || state->x != x || state->y != y) {
state->x = x;
state->y = y;
state->point->setPosition(x, y);
emitValue<output_GFXU0027>(ctx, state->point);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->point);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, point);
}
}
}

View File

@@ -1,11 +1,8 @@
struct State {
};
node {
void evaluate(Context ctx) {
//Change in at least one of the elements in the graphical tree is a signal that the whole tree has changed.
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
//Change in at least one of the elements in the graphical tree is a signal that the whole tree has changed.
if (isInputDirty<input_IN>(ctx))
emitValue<output_OUT>(ctx, 1);
if (isInputDirty<input_IN>(ctx))
emitValue<output_OUT>(ctx, 1);
}
}

View File

@@ -1,47 +1,35 @@
// clang-format off
{{#global}}
#include <Rectangle.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(RectangleOutline)];
RectangleOutline* rectangleOutlineColored;
int16_t x, y, w, h;
int16_t _x, _y, _w, _h;
XColor strokeColor;
};
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
strokeColor = getValue<input_C>(ctx);
void evaluate(Context ctx) {
auto state = getState(ctx);
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t w = (int16_t)getValue<input_W>(ctx);
int16_t h = (int16_t)getValue<input_H>(ctx);
auto gfx = getValue<input_GFX>(ctx);
state->strokeColor = getValue<input_C>(ctx);
if (isSettingUp()) {
rectangleOutlineColored = new (mem) RectangleOutline(gfx);
}
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t w = (int16_t)getValue<input_W>(ctx);
int16_t h = (int16_t)getValue<input_H>(ctx);
if (isSettingUp() || x != _x || y != _y || w != _w || h != _h || isInputDirty<input_C>(ctx)) {
_x = x;
_y = y;
_w = w;
_h = h;
rectangleOutlineColored->setPosition(x, y, w, h);
rectangleOutlineColored->setStyle(&strokeColor);
emitValue<output_GFXU0027>(ctx, rectangleOutlineColored);
}
if (isSettingUp()) {
state->rectangleOutlineColored = new (state->mem) RectangleOutline(gfx);
}
if (isSettingUp() || x != state->x || y != state->y || w != state->w || h != state->h || isInputDirty<input_C>(ctx)) {
state->x = x;
state->y = y;
state->w = w;
state->h = h;
state->rectangleOutlineColored->setPosition(x, y, w, h);
state->rectangleOutlineColored->setStyle(&state->strokeColor);
emitValue<output_GFXU0027>(ctx, state->rectangleOutlineColored);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->rectangleOutlineColored);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, rectangleOutlineColored);
}
}
}

View File

@@ -1,44 +1,32 @@
// clang-format off
{{#global}}
#include <Rectangle.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(RectangleOutline)];
RectangleOutline* rectangleOutline;
int16_t x, y, w, h;
};
int16_t _x, _y, _w, _h;
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
void evaluate(Context ctx) {
auto state = getState(ctx);
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t w = (int16_t)getValue<input_W>(ctx);
int16_t h = (int16_t)getValue<input_H>(ctx);
auto gfx = getValue<input_GFX>(ctx);
if (isSettingUp()) {
rectangleOutline = new (mem) RectangleOutline(gfx);
}
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t w = (int16_t)getValue<input_W>(ctx);
int16_t h = (int16_t)getValue<input_H>(ctx);
if (isSettingUp() || x != _x || y != _y || w != _w || h != _h) {
_x = x;
_y = y;
_w = w;
_h = h;
rectangleOutline->setPosition(x, y, w, h);
emitValue<output_GFXU0027>(ctx, rectangleOutline);
}
if (isSettingUp()) {
state->rectangleOutline = new (state->mem) RectangleOutline(gfx);
}
if (isSettingUp() || x != state->x || y != state->y || w != state->w || h != state->h) {
state->x = x;
state->y = y;
state->w = w;
state->h = h;
state->rectangleOutline->setPosition(x, y, w, h);
emitValue<output_GFXU0027>(ctx, state->rectangleOutline);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->rectangleOutline);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, rectangleOutline);
}
}
}

View File

@@ -1,47 +1,36 @@
// clang-format off
{{#global}}
#include <Rectangle.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(RectangleSolid)];
RectangleSolid* rectangleSolidColored;
int16_t x, y, w, h;
int16_t _x, _y, _w, _h;
XColor fillColor;
};
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
fillColor = getValue<input_C>(ctx);
void evaluate(Context ctx) {
auto state = getState(ctx);
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t w = (int16_t)getValue<input_W>(ctx);
int16_t h = (int16_t)getValue<input_H>(ctx);
auto gfx = getValue<input_GFX>(ctx);
state->fillColor = getValue<input_C>(ctx);
if (isSettingUp()) {
rectangleSolidColored = new (mem) RectangleSolid(gfx);
}
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t w = (int16_t)getValue<input_W>(ctx);
int16_t h = (int16_t)getValue<input_H>(ctx);
if (isSettingUp() || x != _x || y != _y || w != _w || h != _h || isInputDirty<input_C>(ctx)) {
_x = x;
_y = y;
_w = w;
_h = h;
rectangleSolidColored->setPosition(x, y, w, h);
rectangleSolidColored->setStyle(&fillColor);
emitValue<output_GFXU0027>(ctx, rectangleSolidColored);
}
if (isSettingUp()) {
state->rectangleSolidColored = new (state->mem) RectangleSolid(gfx);
}
if (isSettingUp() || x != state->x || y != state->y || w != state->w || h != state->h || isInputDirty<input_C>(ctx)) {
state->x = x;
state->y = y;
state->w = w;
state->h = h;
state->rectangleSolidColored->setPosition(x, y, w, h);
state->rectangleSolidColored->setStyle(&state->fillColor);
emitValue<output_GFXU0027>(ctx, state->rectangleSolidColored);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->rectangleSolidColored);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, rectangleSolidColored);
}
}
}

View File

@@ -1,44 +1,33 @@
// clang-format off
{{#global}}
#include <Rectangle.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(RectangleSolid)];
RectangleSolid* rectangleSolid;
int16_t x, y, w, h;
};
int16_t _x, _y, _w, _h;
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
void evaluate(Context ctx) {
auto state = getState(ctx);
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t w = (int16_t)getValue<input_W>(ctx);
int16_t h = (int16_t)getValue<input_H>(ctx);
auto gfx = getValue<input_GFX>(ctx);
if (isSettingUp()) {
rectangleSolid = new (mem) RectangleSolid(gfx);
}
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
int16_t w = (int16_t)getValue<input_W>(ctx);
int16_t h = (int16_t)getValue<input_H>(ctx);
if (isSettingUp() || x != _x || y != _y || w != _w || h != _h) {
_x = x;
_y = y;
_w = w;
_h = h;
rectangleSolid->setPosition(x, y, w, h);
emitValue<output_GFXU0027>(ctx, rectangleSolid);
}
if (isSettingUp()) {
state->rectangleSolid = new (state->mem) RectangleSolid(gfx);
}
if (isSettingUp() || x != state->x || y != state->y || w != state->w || h != state->h) {
state->x = x;
state->y = y;
state->w = w;
state->h = h;
state->rectangleSolid->setPosition(x, y, w, h);
emitValue<output_GFXU0027>(ctx, state->rectangleSolid);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->rectangleSolid);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, rectangleSolid);
}
}
}

View File

@@ -1,34 +1,29 @@
nodespace {
static const unsigned char icon[] PROGMEM = {
static const unsigned char icon[] PROGMEM = {
0b00000001, 0b11000000, // ###
0b00000011, 0b11100000, // #####
0b00000111, 0b00100000, // ### #
0b00000111, 0b11100000, // ######
0b00000111, 0b00100000, // ### #
0b00000111, 0b11100000, // ######
0b00000111, 0b00100000, // ### #
0b00000111, 0b11100000, // ######
0b00000111, 0b00100000, // ### #
0b00001111, 0b11110000, // ########
0b00011111, 0b11111000, // ##########
0b00011111, 0b11111000, // ##########
0b00011111, 0b11111000, // ##########
0b00011111, 0b11111000, // ##########
0b00001111, 0b11110000, // ########
0b00000111, 0b11100000, // ######
0b00000001, 0b11000000, // ###
0b00000011, 0b11100000, // #####
0b00000111, 0b00100000, // ### #
0b00000111, 0b11100000, // ######
0b00000111, 0b00100000, // ### #
0b00000111, 0b11100000, // ######
0b00000111, 0b00100000, // ### #
0b00000111, 0b11100000, // ######
0b00000111, 0b00100000, // ### #
0b00001111, 0b11110000, // ########
0b00011111, 0b11111000, // ##########
0b00011111, 0b11111000, // ##########
0b00011111, 0b11111000, // ##########
0b00011111, 0b11111000, // ##########
0b00001111, 0b11110000, // ########
0b00000111, 0b11100000, // ######
};
struct State {
uint8_t mem[sizeof(Bitmap)];
Bitmap* myBitmap;
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto state = getState(ctx);
state->myBitmap = new (state->mem) Bitmap(icon, 0, 16, 16);
emitValue<output_BMP>(ctx, state->myBitmap);
};
}
node {
Bitmap myBitmap = Bitmap(icon, 0, 16, 16);
void evaluate(Context ctx) {
emitValue<output_BMP>(ctx, &myBitmap);
}
}

View File

@@ -1,34 +1,29 @@
nodespace {
static const unsigned char icon[] PROGMEM = {
static const unsigned char icon[] PROGMEM = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0xd6,0x74,0xd6,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xdf,0x9f,0xdf,0xbf,0xef,0xff,0x85,0x37,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0x9f,0xf9,0x40,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xa6,0x3b,0xf9,0x60,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0xbf,0xf9,0x20,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0xbf,0xf0,0xe0,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xa6,0x3b,0xe8,0xa0,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0xdf,0xe0,0x80,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0xdf,0xd8,0x40,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6c,0x74,0x7d,0x38,0x9e,0x3c,0xc8,0x40,0xd7,0xff,0x8d,0x99,0x6c,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6c,0x74,0xbf,0x3f,0xea,0x63,0xc0,0x60,0xfb,0x03,0xd7,0xff,0x64,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x74,0xbe,0x5c,0xd0,0xa0,0xe9,0x60,0xf9,0xa0,0xd7,0xff,0x64,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0xb5,0x9e,0x7f,0xc1,0x62,0xd8,0x80,0xe2,0x22,0xc7,0x9f,0x64,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5b,0xf2,0x74,0xf7,0x9e,0x9f,0xa7,0x3f,0xb7,0x3f,0x7d,0x37,0x5b,0xd2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5b,0xf2,0x6c,0x74,0x6c,0x54,0x6c,0x54,0x5b,0xd2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0xd6,0x74,0xd6,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xdf,0x9f,0xdf,0xbf,0xef,0xff,0x85,0x37,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0x9f,0xf9,0x40,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xa6,0x3b,0xf9,0x60,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0xbf,0xf9,0x20,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0xbf,0xf0,0xe0,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xa6,0x3b,0xe8,0xa0,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0xdf,0xe0,0x80,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0xdf,0xd8,0x40,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6c,0x74,0x7d,0x38,0x9e,0x3c,0xc8,0x40,0xd7,0xff,0x8d,0x99,0x6c,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6c,0x74,0xbf,0x3f,0xea,0x63,0xc0,0x60,0xfb,0x03,0xd7,0xff,0x64,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x74,0xbe,0x5c,0xd0,0xa0,0xe9,0x60,0xf9,0xa0,0xd7,0xff,0x64,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0xb5,0x9e,0x7f,0xc1,0x62,0xd8,0x80,0xe2,0x22,0xc7,0x9f,0x64,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5b,0xf2,0x74,0xf7,0x9e,0x9f,0xa7,0x3f,0xb7,0x3f,0x7d,0x37,0x5b,0xd2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5b,0xf2,0x6c,0x74,0x6c,0x54,0x6c,0x54,0x5b,0xd2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
struct State {
uint8_t mem[sizeof(Bitmap)];
Bitmap* myBitmap;
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto state = getState(ctx);
state->myBitmap = new (state->mem) Bitmap(icon, 1, 16, 16);
emitValue<output_BMP>(ctx, state->myBitmap);
};
}
node {
Bitmap myBitmap = Bitmap(icon, 1, 16, 16);
void evaluate(Context ctx) {
emitValue<output_BMP>(ctx, &myBitmap);
}
}

View File

@@ -1,34 +1,29 @@
nodespace {
static const unsigned char icon[] PROGMEM = {
static const unsigned char icon[] PROGMEM = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0xd6,0x74,0xd6,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xdf,0x9f,0xdf,0xbf,0xef,0xff,0x85,0x37,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0x9f,0xf9,0x40,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xa6,0x3b,0xf9,0x60,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0xbf,0xf9,0x20,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0xbf,0xf0,0xe0,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xa6,0x3b,0xe8,0xa0,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0xdf,0xe0,0x80,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0xdf,0xd8,0x40,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6c,0x74,0x7d,0x38,0x9e,0x3c,0xc8,0x40,0xd7,0xff,0x8d,0x99,0x6c,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6c,0x74,0xbf,0x3f,0xea,0x63,0xc0,0x60,0xfb,0x03,0xd7,0xff,0x64,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x74,0xbe,0x5c,0xd0,0xa0,0xe9,0x60,0xf9,0xa0,0xd7,0xff,0x64,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0xb5,0x9e,0x7f,0xc1,0x62,0xd8,0x80,0xe2,0x22,0xc7,0x9f,0x64,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5b,0xf2,0x74,0xf7,0x9e,0x9f,0xa7,0x3f,0xb7,0x3f,0x7d,0x37,0x5b,0xd2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5b,0xf2,0x6c,0x74,0x6c,0x54,0x6c,0x54,0x5b,0xd2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0xd6,0x74,0xd6,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xdf,0x9f,0xdf,0xbf,0xef,0xff,0x85,0x37,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0x9f,0xf9,0x40,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xa6,0x3b,0xf9,0x60,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0xbf,0xf9,0x20,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0xbf,0xf0,0xe0,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xa6,0x3b,0xe8,0xa0,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0xdf,0xe0,0x80,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x54,0xd7,0xdf,0xd8,0x40,0xe7,0xff,0x7d,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6c,0x74,0x7d,0x38,0x9e,0x3c,0xc8,0x40,0xd7,0xff,0x8d,0x99,0x6c,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6c,0x74,0xbf,0x3f,0xea,0x63,0xc0,0x60,0xfb,0x03,0xd7,0xff,0x64,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x74,0xbe,0x5c,0xd0,0xa0,0xe9,0x60,0xf9,0xa0,0xd7,0xff,0x64,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0xb5,0x9e,0x7f,0xc1,0x62,0xd8,0x80,0xe2,0x22,0xc7,0x9f,0x64,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5b,0xf2,0x74,0xf7,0x9e,0x9f,0xa7,0x3f,0xb7,0x3f,0x7d,0x37,0x5b,0xd2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5b,0xf2,0x6c,0x74,0x6c,0x54,0x6c,0x54,0x5b,0xd2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
struct State {
uint8_t mem[sizeof(Bitmap)];
Bitmap* myBitmap;
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto state = getState(ctx);
state->myBitmap = new (state->mem) Bitmap(icon, 2, 16, 16, 0x0000);
emitValue<output_BMP>(ctx, state->myBitmap);
};
}
node {
Bitmap myBitmap = Bitmap(icon, 2, 16, 16, 0x0000);
void evaluate(Context ctx) {
emitValue<output_BMP>(ctx, &myBitmap);
}
}

View File

@@ -1,49 +1,38 @@
// clang-format off
{{#global}}
#include <Text.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(Text)];
Text* textColored;
uint8_t textScale;
int16_t x, y;
uint8_t _textScale;
int16_t _x, _y;
XColor textColor;
};
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
void evaluate(Context ctx) {
textColor = getValue<input_C>(ctx);
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
uint8_t textScale = max(1, (int)getValue<input_SCL>(ctx));
auto state = getState(ctx);
auto gfx = getValue<input_GFX>(ctx);
if (isSettingUp()) {
textColored = new (mem) Text(gfx);
}
state->textColor = getValue<input_C>(ctx);
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
uint8_t textScale = max(1, (int)getValue<input_SCL>(ctx));
if (isSettingUp() || _x != x || _y != y || _textScale != textScale || isInputDirty<input_S>(ctx) || isInputDirty<input_C>(ctx)) {
_x = x;
_y = y;
_textScale = textScale;
textColored->setText(getValue<input_S>(ctx));
textColored->setPosition(x, y);
textColored->setTextScale(textScale);
textColored->setTextColor(&textColor);
emitValue<output_GFXU0027>(ctx, textColored);
}
if (isSettingUp()) {
state->textColored = new (state->mem) Text(gfx);
}
if (isSettingUp() || state->x != x || state->y != y || state->textScale != textScale || isInputDirty<input_S>(ctx) || isInputDirty<input_C>(ctx)) {
state->x = x;
state->y = y;
state->textScale = textScale;
state->textColored->setText(getValue<input_S>(ctx));
state->textColored->setPosition(x, y);
state->textColored->setTextScale(textScale);
state->textColored->setTextColor(&state->textColor);
emitValue<output_GFXU0027>(ctx, state->textColored);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->textColored);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, textColored);
}
}
}

View File

@@ -1,45 +1,34 @@
// clang-format off
{{#global}}
#include <Text.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(Text)];
Text* text;
uint8_t textScale;
int16_t x, y;
};
uint8_t _textScale;
int16_t _x, _y;
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
void evaluate(Context ctx) {
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
uint8_t textScale = max(1, (int)getValue<input_SCL>(ctx));
auto state = getState(ctx);
auto gfx = getValue<input_GFX>(ctx);
if (isSettingUp()) {
text = new (mem) Text(gfx);
}
int16_t x = (int16_t)getValue<input_X>(ctx);
int16_t y = (int16_t)getValue<input_Y>(ctx);
uint8_t textScale = max(1, (int)getValue<input_SCL>(ctx));
if (isSettingUp() || _x != x || _y != y || textScale != _textScale || isInputDirty<input_S>(ctx)) {
_x = x;
_y = y;
_textScale = textScale;
text->setText(getValue<input_S>(ctx));
text->setPosition(x, y);
text->setTextScale(textScale);
emitValue<output_GFXU0027>(ctx, text);
}
if (isSettingUp()) {
state->text = new (state->mem) Text(gfx);
}
if (isSettingUp() || state->x != x || state->y != y || state->textScale != textScale || isInputDirty<input_S>(ctx)) {
state->x = x;
state->y = y;
state->textScale = textScale;
state->text->setText(getValue<input_S>(ctx));
state->text->setPosition(x, y);
state->text->setTextScale(textScale);
emitValue<output_GFXU0027>(ctx, state->text);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->text);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, text);
}
}
}

View File

@@ -1,51 +1,39 @@
// clang-format off
{{#global}}
#include <Triangle.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(TriangleOutline)];
TriangleOutline* triangleOutlineColored;
int16_t x0, y0, x1, y1, x2, y2;
int16_t _x0, _y0, _x1, _y1, _x2, _y2;
XColor strokeColor;
};
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
strokeColor = getValue<input_C>(ctx);
void evaluate(Context ctx) {
auto state = getState(ctx);
int16_t x0 = (int16_t)getValue<input_X0>(ctx);
int16_t y0 = (int16_t)getValue<input_Y0>(ctx);
int16_t x1 = (int16_t)getValue<input_X1>(ctx);
int16_t y1 = (int16_t)getValue<input_Y1>(ctx);
int16_t x2 = (int16_t)getValue<input_X2>(ctx);
int16_t y2 = (int16_t)getValue<input_Y2>(ctx);
auto gfx = getValue<input_GFX>(ctx);
state->strokeColor = getValue<input_C>(ctx);
if (isSettingUp()) {
triangleOutlineColored = new (mem) TriangleOutline(gfx);
}
int16_t x0 = (int16_t)getValue<input_X0>(ctx);
int16_t y0 = (int16_t)getValue<input_Y0>(ctx);
int16_t x1 = (int16_t)getValue<input_X1>(ctx);
int16_t y1 = (int16_t)getValue<input_Y1>(ctx);
int16_t x2 = (int16_t)getValue<input_X2>(ctx);
int16_t y2 = (int16_t)getValue<input_Y2>(ctx);
if (isSettingUp() || x0 != _x0 || y0 != _y0 || x1 != _x1 || y1 != _y1 || x2 != _x2 || y2 != _y2 || isInputDirty<input_C>(ctx)) {
_x0 = x0;
_y0 = y0;
_x1 = x1;
_y1 = y1;
_x2 = x2;
_y2 = y2;
triangleOutlineColored->setPosition(x0, y0, x1, y1, x2, y2);
triangleOutlineColored->setStyle(&strokeColor);
emitValue<output_GFXU0027>(ctx, triangleOutlineColored);
}
if (isSettingUp()) {
state->triangleOutlineColored = new (state->mem) TriangleOutline(gfx);
}
if (isSettingUp() || x0 != state->x0 || y0 != state->y0 || x1 != state->x1 || y1 != state->y1 || x2 != state->x2 || y2 != state->y2 || isInputDirty<input_C>(ctx)) {
state->x0 = x0;
state->y0 = y0;
state->x1 = x1;
state->y1 = y1;
state->x2 = x2;
state->y2 = y2;
state->triangleOutlineColored->setPosition(x0, y0, x1, y1, x2, y2);
state->triangleOutlineColored->setStyle(&state->strokeColor);
emitValue<output_GFXU0027>(ctx, state->triangleOutlineColored);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->triangleOutlineColored);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, triangleOutlineColored);
}
}
}

View File

@@ -1,48 +1,36 @@
// clang-format off
{{#global}}
#include <Triangle.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(TriangleOutline)];
TriangleOutline* triangleOutline;
int16_t x0, y0, x1, y1, x2, y2;
};
int16_t _x0, _y0, _x1, _y1, _x2, _y2;
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
void evaluate(Context ctx) {
auto state = getState(ctx);
int16_t x0 = (int16_t)getValue<input_X0>(ctx);
int16_t y0 = (int16_t)getValue<input_Y0>(ctx);
int16_t x1 = (int16_t)getValue<input_X1>(ctx);
int16_t y1 = (int16_t)getValue<input_Y1>(ctx);
int16_t x2 = (int16_t)getValue<input_X2>(ctx);
int16_t y2 = (int16_t)getValue<input_Y2>(ctx);
auto gfx = getValue<input_GFX>(ctx);
if (isSettingUp()) {
triangleOutline = new (mem) TriangleOutline(gfx);
}
int16_t x0 = (int16_t)getValue<input_X0>(ctx);
int16_t y0 = (int16_t)getValue<input_Y0>(ctx);
int16_t x1 = (int16_t)getValue<input_X1>(ctx);
int16_t y1 = (int16_t)getValue<input_Y1>(ctx);
int16_t x2 = (int16_t)getValue<input_X2>(ctx);
int16_t y2 = (int16_t)getValue<input_Y2>(ctx);
if (isSettingUp() || x0 != _x0 || y0 != _y0 || x1 != _x1 || y1 != _y1 || x2 != _x2 || y2 != _y2) {
_x0 = x0;
_y0 = y0;
_x1 = x1;
_y1 = y1;
_x2 = x2;
_y2 = y2;
triangleOutline->setPosition(x0, y0, x1, y1, x2, y2);
emitValue<output_GFXU0027>(ctx, triangleOutline);
}
if (isSettingUp()) {
state->triangleOutline = new (state->mem) TriangleOutline(gfx);
}
if (isSettingUp() || x0 != state->x0 || y0 != state->y0 || x1 != state->x1 || y1 != state->y1 || x2 != state->x2 || y2 != state->y2) {
state->x0 = x0;
state->y0 = y0;
state->x1 = x1;
state->y1 = y1;
state->x2 = x2;
state->y2 = y2;
state->triangleOutline->setPosition(x0, y0, x1, y1, x2, y2);
emitValue<output_GFXU0027>(ctx, state->triangleOutline);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->triangleOutline);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, triangleOutline);
}
}
}

View File

@@ -1,51 +1,40 @@
// clang-format off
{{#global}}
#include <Triangle.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(TriangleSolid)];
TriangleSolid* triangleSolidColored;
int16_t x0, y0, x1, y1, x2, y2;
int16_t _x0, _y0, _x1, _y1, _x2, _y2;
XColor fillColor;
};
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
fillColor = getValue<input_C>(ctx);
void evaluate(Context ctx) {
auto state = getState(ctx);
int16_t x0 = (int16_t)getValue<input_X0>(ctx);
int16_t y0 = (int16_t)getValue<input_Y0>(ctx);
int16_t x1 = (int16_t)getValue<input_X1>(ctx);
int16_t y1 = (int16_t)getValue<input_Y1>(ctx);
int16_t x2 = (int16_t)getValue<input_X2>(ctx);
int16_t y2 = (int16_t)getValue<input_Y2>(ctx);
auto gfx = getValue<input_GFX>(ctx);
state->fillColor = getValue<input_C>(ctx);
if (isSettingUp()) {
triangleSolidColored = new (mem) TriangleSolid(gfx);
}
int16_t x0 = (int16_t)getValue<input_X0>(ctx);
int16_t y0 = (int16_t)getValue<input_Y0>(ctx);
int16_t x1 = (int16_t)getValue<input_X1>(ctx);
int16_t y1 = (int16_t)getValue<input_Y1>(ctx);
int16_t x2 = (int16_t)getValue<input_X2>(ctx);
int16_t y2 = (int16_t)getValue<input_Y2>(ctx);
if (isSettingUp() || x0 != _x0 || y0 != _y0 || x1 != _x1 || y1 != _y1 || x2 != _x2 || y2 != _y2 || isInputDirty<input_C>(ctx)) {
_x0 = x0;
_y0 = y0;
_x1 = x1;
_y1 = y1;
_x2 = x2;
_y2 = y2;
triangleSolidColored->setPosition(x0, y0, x1, y1, x2, y2);
triangleSolidColored->setStyle(&fillColor);
emitValue<output_GFXU0027>(ctx, triangleSolidColored);
}
if (isSettingUp()) {
state->triangleSolidColored = new (state->mem) TriangleSolid(gfx);
}
if (isSettingUp() || x0 != state->x0 || y0 != state->y0 || x1 != state->x1 || y1 != state->y1 || x2 != state->x2 || y2 != state->y2 || isInputDirty<input_C>(ctx)) {
state->x0 = x0;
state->y0 = y0;
state->x1 = x1;
state->y1 = y1;
state->x2 = x2;
state->y2 = y2;
state->triangleSolidColored->setPosition(x0, y0, x1, y1, x2, y2);
state->triangleSolidColored->setStyle(&state->fillColor);
emitValue<output_GFXU0027>(ctx, state->triangleSolidColored);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->triangleSolidColored);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, triangleSolidColored);
}
}
}

View File

@@ -1,48 +1,37 @@
// clang-format off
{{#global}}
#include <Triangle.h>
{{/global}}
// clang-format on
struct State {
node {
uint8_t mem[sizeof(TriangleSolid)];
TriangleSolid* triangleSolid;
int16_t x0, y0, x1, y1, x2, y2;
};
int16_t _x0, _y0, _x1, _y1, _x2, _y2;
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
auto gfx = getValue<input_GFX>(ctx);
void evaluate(Context ctx) {
auto state = getState(ctx);
int16_t x0 = (int16_t)getValue<input_X0>(ctx);
int16_t y0 = (int16_t)getValue<input_Y0>(ctx);
int16_t x1 = (int16_t)getValue<input_X1>(ctx);
int16_t y1 = (int16_t)getValue<input_Y1>(ctx);
int16_t x2 = (int16_t)getValue<input_X2>(ctx);
int16_t y2 = (int16_t)getValue<input_Y2>(ctx);
auto gfx = getValue<input_GFX>(ctx);
if (isSettingUp()) {
triangleSolid = new (mem) TriangleSolid(gfx);
}
int16_t x0 = (int16_t)getValue<input_X0>(ctx);
int16_t y0 = (int16_t)getValue<input_Y0>(ctx);
int16_t x1 = (int16_t)getValue<input_X1>(ctx);
int16_t y1 = (int16_t)getValue<input_Y1>(ctx);
int16_t x2 = (int16_t)getValue<input_X2>(ctx);
int16_t y2 = (int16_t)getValue<input_Y2>(ctx);
if (isSettingUp() || x0 != _x0 || y0 != _y0 || x1 != _x1 || y1 != _y1 || x2 != _x2 || y2 != _y2) {
_x0 = x0;
_y0 = y0;
_x1 = x1;
_y1 = y1;
_x2 = x2;
_y2 = y2;
triangleSolid->setPosition(x0, y0, x1, y1, x2, y2);
emitValue<output_GFXU0027>(ctx, triangleSolid);
}
if (isSettingUp()) {
state->triangleSolid = new (state->mem) TriangleSolid(gfx);
}
if (isSettingUp() || x0 != state->x0 || y0 != state->y0 || x1 != state->x1 || y1 != state->y1 || x2 != state->x2 || y2 != state->y2) {
state->x0 = x0;
state->y0 = y0;
state->x1 = x1;
state->y1 = y1;
state->x2 = x2;
state->y2 = y2;
state->triangleSolid->setPosition(x0, y0, x1, y1, x2, y2);
emitValue<output_GFXU0027>(ctx, state->triangleSolid);
}
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, state->triangleSolid);
if (isInputDirty<input_GFX>(ctx)) {
emitValue<output_GFXU0027>(ctx, triangleSolid);
}
}
}

View File

@@ -1,34 +1,29 @@
nodespace {
static const unsigned char icon[] PROGMEM = {
static const unsigned char icon[] PROGMEM = {
0b00000000, 0b10000000, // #
0b00000001, 0b11000000, // ###
0b00000001, 0b11000000, // ###
0b00000011, 0b11100000, // #####
0b00000011, 0b01100000, // ## ##
0b00000111, 0b01110000, // ### ###
0b00000110, 0b00110000, // ## ##
0b00001110, 0b10111000, // ### # ###
0b00001100, 0b10011000, // ## # ##
0b00011100, 0b10011100, // ### # ###
0b00011000, 0b10001100, // ## # ##
0b00111000, 0b00001110, // ### ###
0b00110000, 0b10000110, // ## # ##
0b01111111, 0b11111111, // ###############
0b01111111, 0b11111111, // ###############
0b00000000, 0b00000000, //
0b00000000, 0b10000000, // #
0b00000001, 0b11000000, // ###
0b00000001, 0b11000000, // ###
0b00000011, 0b11100000, // #####
0b00000011, 0b01100000, // ## ##
0b00000111, 0b01110000, // ### ###
0b00000110, 0b00110000, // ## ##
0b00001110, 0b10111000, // ### # ###
0b00001100, 0b10011000, // ## # ##
0b00011100, 0b10011100, // ### # ###
0b00011000, 0b10001100, // ## # ##
0b00111000, 0b00001110, // ### ###
0b00110000, 0b10000110, // ## # ##
0b01111111, 0b11111111, // ###############
0b01111111, 0b11111111, // ###############
0b00000000, 0b00000000, //
};
struct State {
uint8_t mem[sizeof(Bitmap)];
Bitmap* myBitmap;
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto state = getState(ctx);
state->myBitmap = new (state->mem) Bitmap(icon, 0, 16, 16);
emitValue<output_BMP>(ctx, state->myBitmap);
};
}
node {
Bitmap myBitmap = Bitmap(icon, 0, 16, 16);
void evaluate(Context ctx) {
emitValue<output_BMP>(ctx, &myBitmap);
}
}

View File

@@ -1,34 +1,29 @@
nodespace {
static const unsigned char icon[] PROGMEM = {
static const unsigned char icon[] PROGMEM = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6b,0x23,0x6b,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf7,0x07,0xf7,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb5,0x25,0xff,0x47,0xff,0x47,0xb5,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf7,0x07,0xff,0x47,0xff,0x47,0xf7,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb5,0x25,0xff,0x27,0x83,0xe7,0x83,0xe7,0xff,0x27,0xb5,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf6,0xe7,0xf6,0xe7,0x42,0x07,0x42,0x07,0xf6,0xe7,0xf6,0xe7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb5,0x05,0xff,0x26,0xf6,0xc6,0x4a,0x27,0x4a,0x27,0xf6,0xc6,0xff,0x26,0xb5,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf6,0xc6,0xff,0x05,0xf6,0xc6,0x52,0x66,0x52,0x66,0xf6,0xc6,0xff,0x05,0xf6,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0xb4,0xe4,0xfe,0xe5,0xfe,0xe5,0xfe,0xc5,0x5a,0x86,0x5a,0xa6,0xfe,0xc5,0xfe,0xe5,0xfe,0xe5,0xb5,0x04,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0xf6,0x85,0xfe,0xe5,0xfe,0xe5,0xfe,0xc5,0x62,0xc5,0x62,0xc5,0xfe,0xc5,0xfe,0xe5,0xfe,0xe5,0xf6,0x85,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0xb4,0xc3,0xfe,0xc4,0xfe,0xc4,0xfe,0xc4,0xfe,0xa4,0x6b,0x05,0x6b,0x05,0xfe,0xa4,0xfe,0xc4,0xfe,0xc4,0xfe,0xc4,0xb4,0xe3,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0xf6,0x44,0xfe,0xa3,0xfe,0xa3,0xfe,0xa3,0xfe,0xa3,0x9c,0x24,0x9c,0x24,0xfe,0xa3,0xfe,0xa3,0xfe,0xa3,0xfe,0xa3,0xf6,0x44,0x00,0x00,0x00,0x00
,0x00,0x00,0xb4,0xa3,0xfe,0x83,0xfe,0x83,0xfe,0x83,0xfe,0x83,0xfe,0x63,0x8b,0xa4,0x8b,0xa4,0xfe,0x63,0xfe,0x83,0xfe,0x83,0xfe,0x83,0xfe,0x83,0xb4,0xa3,0x00,0x00
,0x00,0x00,0xf6,0x02,0xfe,0x62,0xfe,0x62,0xfe,0x62,0xfe,0x62,0xfe,0x42,0x8b,0xa3,0x8b,0xa3,0xfe,0x42,0xfe,0x62,0xfe,0x62,0xfe,0x62,0xfe,0x62,0xf6,0x02,0x00,0x00
,0x83,0x41,0xfe,0x21,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x22,0xfe,0x22,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x21,0x83,0x41
,0x00,0x00,0x83,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x83,0x41,0x00,0x00
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6b,0x23,0x6b,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf7,0x07,0xf7,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb5,0x25,0xff,0x47,0xff,0x47,0xb5,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf7,0x07,0xff,0x47,0xff,0x47,0xf7,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb5,0x25,0xff,0x27,0x83,0xe7,0x83,0xe7,0xff,0x27,0xb5,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf6,0xe7,0xf6,0xe7,0x42,0x07,0x42,0x07,0xf6,0xe7,0xf6,0xe7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb5,0x05,0xff,0x26,0xf6,0xc6,0x4a,0x27,0x4a,0x27,0xf6,0xc6,0xff,0x26,0xb5,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf6,0xc6,0xff,0x05,0xf6,0xc6,0x52,0x66,0x52,0x66,0xf6,0xc6,0xff,0x05,0xf6,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00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,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x83,0x41,0x00,0x00
};
struct State {
uint8_t mem[sizeof(Bitmap)];
Bitmap* myBitmap;
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto state = getState(ctx);
state->myBitmap = new (state->mem) Bitmap(icon, 1, 16, 16);
emitValue<output_BMP>(ctx, state->myBitmap);
};
}
node {
Bitmap myBitmap = Bitmap(icon, 1, 16, 16);
void evaluate(Context ctx) {
emitValue<output_BMP>(ctx, &myBitmap);
}
}

View File

@@ -1,34 +1,29 @@
nodespace {
static const unsigned char icon[] PROGMEM = {
static const unsigned char icon[] PROGMEM = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6b,0x23,0x6b,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf7,0x07,0xf7,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb5,0x25,0xff,0x47,0xff,0x47,0xb5,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf7,0x07,0xff,0x47,0xff,0x47,0xf7,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb5,0x25,0xff,0x27,0x83,0xe7,0x83,0xe7,0xff,0x27,0xb5,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf6,0xe7,0xf6,0xe7,0x42,0x07,0x42,0x07,0xf6,0xe7,0xf6,0xe7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb5,0x05,0xff,0x26,0xf6,0xc6,0x4a,0x27,0x4a,0x27,0xf6,0xc6,0xff,0x26,0xb5,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf6,0xc6,0xff,0x05,0xf6,0xc6,0x52,0x66,0x52,0x66,0xf6,0xc6,0xff,0x05,0xf6,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0xb4,0xe4,0xfe,0xe5,0xfe,0xe5,0xfe,0xc5,0x5a,0x86,0x5a,0xa6,0xfe,0xc5,0xfe,0xe5,0xfe,0xe5,0xb5,0x04,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0xf6,0x85,0xfe,0xe5,0xfe,0xe5,0xfe,0xc5,0x62,0xc5,0x62,0xc5,0xfe,0xc5,0xfe,0xe5,0xfe,0xe5,0xf6,0x85,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0xb4,0xc3,0xfe,0xc4,0xfe,0xc4,0xfe,0xc4,0xfe,0xa4,0x6b,0x05,0x6b,0x05,0xfe,0xa4,0xfe,0xc4,0xfe,0xc4,0xfe,0xc4,0xb4,0xe3,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0xf6,0x44,0xfe,0xa3,0xfe,0xa3,0xfe,0xa3,0xfe,0xa3,0x9c,0x24,0x9c,0x24,0xfe,0xa3,0xfe,0xa3,0xfe,0xa3,0xfe,0xa3,0xf6,0x44,0x00,0x00,0x00,0x00
,0x00,0x00,0xb4,0xa3,0xfe,0x83,0xfe,0x83,0xfe,0x83,0xfe,0x83,0xfe,0x63,0x8b,0xa4,0x8b,0xa4,0xfe,0x63,0xfe,0x83,0xfe,0x83,0xfe,0x83,0xfe,0x83,0xb4,0xa3,0x00,0x00
,0x00,0x00,0xf6,0x02,0xfe,0x62,0xfe,0x62,0xfe,0x62,0xfe,0x62,0xfe,0x42,0x8b,0xa3,0x8b,0xa3,0xfe,0x42,0xfe,0x62,0xfe,0x62,0xfe,0x62,0xfe,0x62,0xf6,0x02,0x00,0x00
,0x83,0x41,0xfe,0x21,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x22,0xfe,0x22,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x21,0x83,0x41
,0x00,0x00,0x83,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x83,0x41,0x00,0x00
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6b,0x23,0x6b,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf7,0x07,0xf7,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb5,0x25,0xff,0x47,0xff,0x47,0xb5,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf7,0x07,0xff,0x47,0xff,0x47,0xf7,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb5,0x25,0xff,0x27,0x83,0xe7,0x83,0xe7,0xff,0x27,0xb5,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf6,0xe7,0xf6,0xe7,0x42,0x07,0x42,0x07,0xf6,0xe7,0xf6,0xe7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb5,0x05,0xff,0x26,0xf6,0xc6,0x4a,0x27,0x4a,0x27,0xf6,0xc6,0xff,0x26,0xb5,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf6,0xc6,0xff,0x05,0xf6,0xc6,0x52,0x66,0x52,0x66,0xf6,0xc6,0xff,0x05,0xf6,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0xb4,0xe4,0xfe,0xe5,0xfe,0xe5,0xfe,0xc5,0x5a,0x86,0x5a,0xa6,0xfe,0xc5,0xfe,0xe5,0xfe,0xe5,0xb5,0x04,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0xf6,0x85,0xfe,0xe5,0xfe,0xe5,0xfe,0xc5,0x62,0xc5,0x62,0xc5,0xfe,0xc5,0xfe,0xe5,0xfe,0xe5,0xf6,0x85,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0xb4,0xc3,0xfe,0xc4,0xfe,0xc4,0xfe,0xc4,0xfe,0xa4,0x6b,0x05,0x6b,0x05,0xfe,0xa4,0xfe,0xc4,0xfe,0xc4,0xfe,0xc4,0xb4,0xe3,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0xf6,0x44,0xfe,0xa3,0xfe,0xa3,0xfe,0xa3,0xfe,0xa3,0x9c,0x24,0x9c,0x24,0xfe,0xa3,0xfe,0xa3,0xfe,0xa3,0xfe,0xa3,0xf6,0x44,0x00,0x00,0x00,0x00
,0x00,0x00,0xb4,0xa3,0xfe,0x83,0xfe,0x83,0xfe,0x83,0xfe,0x83,0xfe,0x63,0x8b,0xa4,0x8b,0xa4,0xfe,0x63,0xfe,0x83,0xfe,0x83,0xfe,0x83,0xfe,0x83,0xb4,0xa3,0x00,0x00
,0x00,0x00,0xf6,0x02,0xfe,0x62,0xfe,0x62,0xfe,0x62,0xfe,0x62,0xfe,0x42,0x8b,0xa3,0x8b,0xa3,0xfe,0x42,0xfe,0x62,0xfe,0x62,0xfe,0x62,0xfe,0x62,0xf6,0x02,0x00,0x00
,0x83,0x41,0xfe,0x21,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x22,0xfe,0x22,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x41,0xfe,0x21,0x83,0x41
,0x00,0x00,0x83,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x8b,0x41,0x83,0x41,0x00,0x00
};
struct State {
uint8_t mem[sizeof(Bitmap)];
Bitmap* myBitmap;
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto state = getState(ctx);
state->myBitmap = new (state->mem) Bitmap(icon, 2, 16, 16, 0x0000);
emitValue<output_BMP>(ctx, state->myBitmap);
};
}
node {
Bitmap myBitmap = Bitmap(icon, 2, 16, 16, 0x0000);
void evaluate(Context ctx) {
emitValue<output_BMP>(ctx, &myBitmap);
}
}

View File

@@ -1,34 +1,29 @@
nodespace {
static const unsigned char icon[] PROGMEM = {
static const unsigned char icon[] PROGMEM = {
0b00000000, 0b00000000, //
0b00000111, 0b11100000, // ######
0b00011111, 0b11111000, // ##########
0b00111111, 0b11111100, // ############
0b01110000, 0b00001110, // ### ###
0b01100111, 0b11100110, // ## ###### ##
0b00001111, 0b11110000, // ########
0b00011000, 0b00011000, // ## ##
0b00000011, 0b11000000, // ####
0b00000111, 0b11100000, // ######
0b00000100, 0b00100000, // # #
0b00000001, 0b10000000, // ##
0b00000001, 0b10000000, // ##
0b00000000, 0b00000000, //
0b00000000, 0b00000000, //
0b00000000, 0b00000000, //
0b00000000, 0b00000000, //
0b00000111, 0b11100000, // ######
0b00011111, 0b11111000, // ##########
0b00111111, 0b11111100, // ############
0b01110000, 0b00001110, // ### ###
0b01100111, 0b11100110, // ## ###### ##
0b00001111, 0b11110000, // ########
0b00011000, 0b00011000, // ## ##
0b00000011, 0b11000000, // ####
0b00000111, 0b11100000, // ######
0b00000100, 0b00100000, // # #
0b00000001, 0b10000000, // ##
0b00000001, 0b10000000, // ##
0b00000000, 0b00000000, //
0b00000000, 0b00000000, //
0b00000000, 0b00000000, //
};
struct State {
uint8_t mem[sizeof(Bitmap)];
Bitmap* myBitmap;
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto state = getState(ctx);
state->myBitmap = new (state->mem) Bitmap(icon, 0, 16, 16);
emitValue<output_BMP>(ctx, state->myBitmap);
};
}
node {
Bitmap myBitmap = Bitmap(icon, 0, 16, 16);
void evaluate(Context ctx) {
emitValue<output_BMP>(ctx, &myBitmap);
}
}

View File

@@ -1,34 +1,29 @@
nodespace {
static const unsigned char icon[] PROGMEM = {
static const unsigned char icon[] PROGMEM = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0xee,0x4d,0x1a,0x55,0xfe,0x55,0xfe,0x55,0xfe,0x55,0xfe,0x4d,0x3a,0x2a,0xef,0x00,0x00,0x00,0x00,0x00,0x00,0x00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3b,0x3d,0x3b,0x34,0x76,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1a,0x2b,0x34,0x35,0x3d,0x1a,0x3d,0x1a,0x3d,0x1a,0x3d,0x1a,0x34,0x35,0x1a,0x4c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0xee,0x4d,0x1a,0x55,0xfe,0x55,0xfe,0x55,0xfe,0x55,0xfe,0x4d,0x3a,0x2a,0xef,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x4d,0x3a,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x4d,0x5b,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x4d,0x9c,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x4d,0xbc,0x00,0x00,0x00,0x00
,0x00,0x00,0x45,0x1a,0x4d,0xbd,0x4d,0xbd,0x4d,0xbd,0x4d,0xbd,0x5d,0xfd,0x76,0x3d,0x6e,0x3d,0x5d,0xdd,0x4d,0xbd,0x4d,0xbd,0x4d,0xbd,0x4d,0xbd,0x45,0x3a,0x00,0x00
,0x22,0xad,0x4d,0xbd,0x4d,0xbd,0x55,0xdd,0xa6,0xde,0xe7,0xbf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0x7f,0x96,0x9e,0x4d,0xbd,0x4d,0xbd,0x4d,0xbd,0x22,0xee
,0x3c,0xd8,0x4d,0xbd,0x7e,0x5d,0xef,0xbf,0xff,0xff,0xcf,0x1d,0x96,0x7c,0x7e,0x1c,0x7e,0x1c,0x9e,0x7d,0xd7,0x5e,0xff,0xff,0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0x3d,0x5b,0x3d,0x5b,0x3d,0x5b,0x3d,0x5b,0x3d,0x5b,0x3c,0x97,0x00,0x00
,0x00,0x00,0x00,0x00,0x3c,0xd9,0x3d,0x5b,0x3d,0x5b,0x3d,0x5b,0x3d,0x5b,0x55,0x7b,0x4d,0x5b,0x3d,0x5b,0x3d,0x5b,0x3d,0x5b,0x3d,0x5b,0x3c,0xf9,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x34,0x56,0x3d,0x3b,0x3d,0x3b,0x3d,0x3b,0x3d,0x3b,0x3d,0x3b,0x3d,0x3b,0x3d,0x3b,0x3d,0x3b,0x34,0x76,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1a,0x2b,0x34,0x35,0x3d,0x1a,0x3d,0x1a,0x3d,0x1a,0x3d,0x1a,0x34,0x35,0x1a,0x4c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
struct State {
uint8_t mem[sizeof(Bitmap)];
Bitmap* myBitmap;
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto state = getState(ctx);
state->myBitmap = new (state->mem) Bitmap(icon, 1, 16, 16);
emitValue<output_BMP>(ctx, state->myBitmap);
};
}
node {
Bitmap myBitmap = Bitmap(icon, 1, 16, 16);
void evaluate(Context ctx) {
emitValue<output_BMP>(ctx, &myBitmap);
}
}

View File

@@ -1,34 +1,29 @@
nodespace {
static const unsigned char icon[] PROGMEM = {
static const unsigned char icon[] PROGMEM = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0xee,0x4d,0x1a,0x55,0xfe,0x55,0xfe,0x55,0xfe,0x55,0xfe,0x4d,0x3a,0x2a,0xef,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x4d,0x3a,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0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d,0x1a,0x3d,0x1a,0x3d,0x1a,0x3d,0x1a,0x34,0x35,0x1a,0x4c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0xee,0x4d,0x1a,0x55,0xfe,0x55,0xfe,0x55,0xfe,0x55,0xfe,0x4d,0x3a,0x2a,0xef,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x4d,0x3a,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x4d,0x5b,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x4d,0x9c,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x55,0xdd,0x4d,0xbc,0x00,0x00,0x00,0x00
,0x00,0x00,0x45,0x1a,0x4d,0xbd,0x4d,0xbd,0x4d,0xbd,0x4d,0xbd,0x5d,0xfd,0x76,0x3d,0x6e,0x3d,0x5d,0xdd,0x4d,0xbd,0x4d,0xbd,0x4d,0xbd,0x4d,0xbd,0x45,0x3a,0x00,0x00
,0x22,0xad,0x4d,0xbd,0x4d,0xbd,0x55,0xdd,0xa6,0xde,0xe7,0xbf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0x7f,0x96,0x9e,0x4d,0xbd,0x4d,0xbd,0x4d,0xbd,0x22,0xee
,0x3c,0xd8,0x4d,0xbd,0x7e,0x5d,0xef,0xbf,0xff,0xff,0xcf,0x1d,0x96,0x7c,0x7e,0x1c,0x7e,0x1c,0x9e,0x7d,0xd7,0x5e,0xff,0xff,0xdf,0x9f,0x65,0xfd,0x4d,0xbd,0x44,0xf9
,0x4d,0x9c,0x6e,0x1d,0xff,0xff,0xdf,0x7e,0x6d,0xdc,0x4d,0x9c,0x76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0x5b,0x3d,0x5b,0x3d,0x5b,0x3d,0x5b,0x55,0x7b,0x4d,0x5b,0x3d,0x5b,0x3d,0x5b,0x3d,0x5b,0x3d,0x5b,0x3c,0xf9,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x34,0x56,0x3d,0x3b,0x3d,0x3b,0x3d,0x3b,0x3d,0x3b,0x3d,0x3b,0x3d,0x3b,0x3d,0x3b,0x3d,0x3b,0x34,0x76,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1a,0x2b,0x34,0x35,0x3d,0x1a,0x3d,0x1a,0x3d,0x1a,0x3d,0x1a,0x34,0x35,0x1a,0x4c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
struct State {
uint8_t mem[sizeof(Bitmap)];
Bitmap* myBitmap;
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto state = getState(ctx);
state->myBitmap = new (state->mem) Bitmap(icon, 2, 16, 16, 0x0000);
emitValue<output_BMP>(ctx, state->myBitmap);
};
}
node {
Bitmap myBitmap = Bitmap(icon, 2, 16, 16, 0x0000);
void evaluate(Context ctx) {
emitValue<output_BMP>(ctx, &myBitmap);
}
}