// render.h - UI scaling, colormaps, spectrogram texture generation, drawing #ifndef RENDER_H #define RENDER_H #include "spectrogram_types.h" // --- UI scaling & scaled text --- float GetUIScale(void); void DrawTextScaled(const char* text, float x, float y, float baseSize, Color color); float MeasureTextScaled(const char* text, float baseSize); // --- Colormaps --- void GenerateColormapTexture(void); const char* ColormapName(ColormapType type); // --- Spectrogram texture --- // GenerateSpectrogramTexture recomputes the synchrosqueezed reassignment (use // when the STFT changes). ColorizeSpectrogram only re-maps the cached // reassignment to colors (use for dB-floor / colormap changes). void GenerateSpectrogramTexture(StftResult* stft, Image* image, Texture2D* texture); void ColorizeSpectrogram(Image* image, Texture2D* texture); // --- On-screen drawing (operate on the global app state) --- void DrawSpectrogramGrid(Rectangle bounds, int numCellsX, int numCellsY, Color color); void DrawLabels(Rectangle bounds); void DrawSelection(Rectangle bounds); void DrawSelectionDrag(Rectangle bounds); void DrawPlayhead(Rectangle bounds); #endif // RENDER_H