mirror of
https://github.com/stasenso/rp_pico_test.git
synced 2026-06-26 21:42:44 +03:00
Font is displayed correctly
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
#include "DrawBezier.h"
|
||||
// Установка пикселя в буфере (с проверкой границ)
|
||||
void set_pixel(int x, int y, uint16_t color) {
|
||||
void set_pixel(uint16_t x, uint16_t y, uint16_t color) {
|
||||
if (x >= 0 && x < WIDTH && y >= 0 && y < HEIGHT) {
|
||||
frame_buffer[y * WIDTH + x] = color;
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@
|
||||
#include <math.h>
|
||||
#include "Thread.h"
|
||||
|
||||
void set_pixel(int x, int y, uint16_t color);
|
||||
void set_pixel(uint16_t x, uint16_t y, uint16_t color);
|
||||
float bernstein(int i, int n, float t);
|
||||
void draw_bezier(const int *points_x, const int *points_y, size_t num_points, uint16_t color);
|
||||
+5
-5
File diff suppressed because one or more lines are too long
+3
-3
@@ -2,11 +2,11 @@
|
||||
#define FONT_DATA_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <wchar.h>
|
||||
extern const uint16_t font_width;
|
||||
extern const uint16_t font_height;
|
||||
extern const uint8_t font_data[];
|
||||
|
||||
void draw_string(uint16_t x, uint16_t y, const char *str);
|
||||
void draw_char(uint8_t x, uint8_t y, char c);
|
||||
void draw_string(uint16_t x, uint16_t y, const wchar_t *str);
|
||||
void draw_char(uint16_t x, uint16_t y, wchar_t c);
|
||||
#endif // FONT_DATA_H
|
||||
|
||||
@@ -27,7 +27,7 @@ int main() {
|
||||
|
||||
fillBufer(frame_buffer,reverse(0x4A69));//
|
||||
generate_sine_wave_points(num_points, 50, freq, 0, HEIGHT / 2,x);
|
||||
draw_string(0,50,"Proverka latinnicy");
|
||||
draw_string(0,50,L"Проверка кириллицы");
|
||||
multicore_fifo_push_blocking(0); //Экран 0 нарисован
|
||||
x+=0.03;
|
||||
if (minmax)
|
||||
@@ -43,8 +43,8 @@ int main() {
|
||||
else freq+=0.005;
|
||||
}
|
||||
|
||||
set_pixel(0,0,reverse(0b1111100000000000));
|
||||
|
||||
|
||||
//sleep_ms(20);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user