4 Commits
Author SHA1 Message Date
admin f22635d20b Merge pull request #42 from Alpaq92/release-0.5.1
Version 0.5.1
2026-10-13 20:17:55 +02:00
adminandClaude Opus 5.5 01678c0f0e Version 0.5.1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 20:16:21 +02:00
admin 2f22157375 Merge pull request #41 from Alpaq92/logo-downscale
Smooth downscale for large raster images
2026-10-13 20:10:23 +02:00
adminandClaude Opus 5.5 ea801d0d7b Halve a large raster image before it becomes a texture
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 20:07:47 +02:00
3 changed files with 14 additions and 3 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(reaktor VERSION 0.5.0 LANGUAGES C CXX)
project(reaktor VERSION 0.5.1 LANGUAGES C CXX)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(_reaktor_top ON)
+12 -1
View File
@@ -176,10 +176,21 @@ img_lookup(App *app, const char *src, int px)
w = plutovg_surface_get_width(surf);
h = plutovg_surface_get_height(surf);
stride = plutovg_surface_get_stride(surf);
reaktor_unpremultiply(plutovg_surface_get_data(surf), w, h, stride);
sdlsurf = SDL_CreateSurfaceFrom(w, h, SDL_PIXELFORMAT_ARGB8888,
plutovg_surface_get_data(surf), stride);
while (sdlsurf && (w >= 2 * px || h >= 2 * px) && w > 1 && h > 1) {
SDL_Surface *half = SDL_ScaleSurface(sdlsurf, w / 2, h / 2,
SDL_SCALEMODE_LINEAR);
SDL_DestroySurface(sdlsurf);
sdlsurf = half;
w /= 2;
h /= 2;
}
if (sdlsurf)
reaktor_unpremultiply((unsigned char *)sdlsurf->pixels, w, h,
sdlsurf->pitch);
tex = sdlsurf ? SDL_CreateTextureFromSurface(app->ren, sdlsurf) : NULL;
if (sdlsurf) SDL_DestroySurface(sdlsurf);
plutovg_surface_destroy(surf);
+1 -1
View File
@@ -72,7 +72,7 @@ errors, so an internal function cannot slip back in.
| `reaktor_lang_pref(app)` | The language `--lang` asked for, or `NULL` |
| `reaktor_set_borderless(app, on)`, `reaktor_borderless(app)` | Switch the main window's frame off for a titlebar of your own, drawn with `.window.hit_test` |
| `reaktor_set_visible(app, on)` | Show or hide that App's window; with `.window.hidden`, the main window waits for it |
| `reaktor_version()` | Reaktor's version, such as `"0.5.0"` |
| `reaktor_version()` | Reaktor's version, such as `"0.5.1"` |
The `set` calls are for the main thread, take effect at the next frame, and do
nothing when nothing changes.