summaryrefslogtreecommitdiff
path: root/src/ScreenDump.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2026-10-26 20:05:20 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2026-10-26 20:05:20 +0100
commit375d87a9b0ec1cf2fffd705adb870c86144d2400 (patch)
tree1e8e05e7cd58686628d0f4622622456613a42e4d /src/ScreenDump.cxx
parent45425dd047b791fe63f13a46a3251c529cfffc94 (diff)
Replace the C++ implementation with the Rust port
The Rust port (formerly gipfel-rs) is now the official successor to the FLTK/GSL C++ code base. This squashes the port into a single commit and removes the C++ sources (they remain in the git history below). Layout: crates/gipfel-core headless core: hills, panorama geometry, projections (maxima-generated derivatives), pure-Rust LM fit, gipfel: JPEG comment + EXIF I/O, profiles, stitching crates/gipfel-cli command-line tools (export, info, stitch, profiles) crates/gipfel-app Cosmic DE (libcosmic) GUI, binary name `gipfel` codegen/ maxima scripts + regen.sh for the projection code tests/ golden files + C++ reference harnesses (historical) The original README is kept for now; it will be updated to describe the Rust build. gipfel.dat, AUTHORS, ChangeLog and NEWS are unchanged.
Diffstat (limited to 'src/ScreenDump.cxx')
-rw-r--r--src/ScreenDump.cxx59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/ScreenDump.cxx b/src/ScreenDump.cxx
deleted file mode 100644
index f331a76..0000000
--- a/src/ScreenDump.cxx
+++ /dev/null
@@ -1,59 +0,0 @@
-//
-// Copyright 2009 Johannes Hofmann <Johannes.Hofmann@gmx.de>
-//
-// This software may be used and distributed according to the terms
-// of the GNU General Public License, incorporated herein by reference.
-
-#include <FL/Fl.H>
-#include <FL/x.H>
-#include <FL/fl_draw.H>
-
-#include "ScreenDump.H"
-
-ScreenDump::ScreenDump(Fl_Widget *widget) {
- Fl_Offscreen offscreen;
- int x, y;
-
- x = widget->x();
- y = widget->y();
- w = widget->w();
- h = widget->h();
-
- Fl::flush();
- widget->resize(0, 0, w, h);
-
- offscreen = fl_create_offscreen(w, h);
- fl_begin_offscreen(offscreen);
- widget->redraw();
- widget->draw();
- fl_color(FL_YELLOW);
- fl_draw("created with gipfel", w - 80, h - 10);
- rgb = fl_read_image(NULL, 0, 0, w, h);
- fl_end_offscreen();
- fl_delete_offscreen(offscreen);
-
- widget->resize(x, y, w, h);
-}
-
-ScreenDump::~ScreenDump() {
- if (rgb)
- delete[] rgb;
-}
-
-int
-ScreenDump::save(OutputImage *out) {
- if (!rgb)
- return 1;
-
- out->init(w, h);
-
- for (int y = 0; y < h; y++) {
- for (int x = 0; x < w; x++) {
- unsigned char *px = &rgb[(y * w + x) * 3];
- out->set_pixel(x, px[0] * 255, px[1] * 255, px[2] * 255);
- }
- out->next_line();
- }
-
- return out->done();
-}