diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-29 19:54:06 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-29 19:54:30 +0200 |
commit | 61bc597b2da60f62870304e30149afb60622980c (patch) | |
tree | 5098e124f85e28e1d0fdf963ea003d69bc1e9833 /Demos | |
parent | c9bab8b8703c967318ef781c47e8978b86d20290 (diff) | |
download | serenity-61bc597b2da60f62870304e30149afb60622980c.zip |
Demos: Remove useless PaintTest program
Diffstat (limited to 'Demos')
-rw-r--r-- | Demos/PaintTest/Makefile | 22 | ||||
-rw-r--r-- | Demos/PaintTest/main.cpp | 53 |
2 files changed, 0 insertions, 75 deletions
diff --git a/Demos/PaintTest/Makefile b/Demos/PaintTest/Makefile deleted file mode 100644 index eacfb875ce..0000000000 --- a/Demos/PaintTest/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -include ../../Makefile.common - -OBJS = \ - main.o - -APP = PaintTest - -DEFINES += -DUSERLAND - -all: $(APP) - -$(APP): $(OBJS) - $(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -ldraw -lcore -lc - -.cpp.o: - @echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $< - --include $(OBJS:%.o=%.d) - -clean: - @echo "CLEAN"; rm -f $(APP) $(OBJS) *.d - diff --git a/Demos/PaintTest/main.cpp b/Demos/PaintTest/main.cpp deleted file mode 100644 index 8cd0fde90e..0000000000 --- a/Demos/PaintTest/main.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include <LibGUI/GApplication.h> -#include <LibGUI/GPainter.h> -#include <LibGUI/GWidget.h> -#include <LibGUI/GWindow.h> -#include <LibDraw/PNGLoader.h> - -class TestWidget final : public GWidget { -public: - TestWidget(GWidget* parent) - : GWidget(parent) - { - } - virtual ~TestWidget() override {} - - void set_bitmap(RefPtr<GraphicsBitmap>&& bitmap) - { - m_bitmap = move(bitmap); - update(); - } - -private: - virtual void paint_event(GPaintEvent&) override - { - GPainter painter(*this); - - painter.fill_rect(rect(), Color::WarmGray); - - painter.blit_tiled({ 0, 0, 160, 160 }, *m_bitmap, m_bitmap->rect()); - - painter.add_clip_rect({ 50, 50, 115, 95 }); - painter.blit_tiled({ 160, 160, 160, 160 }, *m_bitmap, m_bitmap->rect()); - } - - RefPtr<GraphicsBitmap> m_bitmap; -}; - -int main(int argc, char** argv) -{ - GApplication app(argc, argv); - - auto window = GWindow::construct(); - window->set_rect(100, 100, 400, 400); - window->set_title("Paint test"); - - auto test_widget = new TestWidget(nullptr); - window->set_main_widget(test_widget); - - test_widget->set_bitmap(load_png("/res/icons/gear16.png")); - - window->show(); - - return app.exec(); -} |