tft-lcd-draw-line

bradzilla84/color-tft-lcd-driver-mcufriend-kbv/tft-lcd-draw-line

No description
tft-lcd-draw-line
@/tft-lcd-draw-line
IN@/tft-lcd-device
StartXnumber
Position X Start
StartYnumber
Position Y Start
EndXnumber
Position X End
EndYnumber
Position Y End
Colorbradzilla84/color-rgb-hsl/rgb-color-pack
Color to Fill with
INITpulse
Pulse to update
tft-lcd-draw-line
IN
OUT
StartX
StartY
EndX
EndY
Color
INIT
OK
OKpulse
Pulse on Complete
OUT@/tft-lcd-device
To use the node in your project you should have the bradzilla84/color-tft-lcd-driver-mcufriend-kbv library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
    if (!isInputDirty<input_INIT>(ctx)){
        emitValue<output_OUT>(ctx, getValue<input_IN>(ctx));
        return;}

    auto tft = getValue<input_IN>(ctx);
    auto color = getValue<input_Color>(ctx);

    tft->drawLine(getValue<input_StartX>(ctx),getValue<input_StartY>(ctx),getValue<input_EndX>(ctx),getValue<input_EndY>(ctx),color.Hex);


    emitValue<output_OUT>(ctx, getValue<input_IN>(ctx));
    emitValue<output_OK>(ctx, 1);
}