mirror of
https://github.com/stasenso/rp_pico_display_engine.git
synced 2026-06-26 21:32:41 +03:00
Font is displayed correctly
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
#include "DrawBezier.h"
|
#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) {
|
if (x >= 0 && x < WIDTH && y >= 0 && y < HEIGHT) {
|
||||||
frame_buffer[y * WIDTH + x] = color;
|
frame_buffer[y * WIDTH + x] = color;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -4,6 +4,6 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "Thread.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);
|
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);
|
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
|
#define FONT_DATA_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <wchar.h>
|
||||||
extern const uint16_t font_width;
|
extern const uint16_t font_width;
|
||||||
extern const uint16_t font_height;
|
extern const uint16_t font_height;
|
||||||
extern const uint8_t font_data[];
|
extern const uint8_t font_data[];
|
||||||
|
|
||||||
void draw_string(uint16_t x, uint16_t y, const char *str);
|
void draw_string(uint16_t x, uint16_t y, const wchar_t *str);
|
||||||
void draw_char(uint8_t x, uint8_t y, char c);
|
void draw_char(uint16_t x, uint16_t y, wchar_t c);
|
||||||
#endif // FONT_DATA_H
|
#endif // FONT_DATA_H
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ int main() {
|
|||||||
|
|
||||||
fillBufer(frame_buffer,reverse(0x4A69));//
|
fillBufer(frame_buffer,reverse(0x4A69));//
|
||||||
generate_sine_wave_points(num_points, 50, freq, 0, HEIGHT / 2,x);
|
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 нарисован
|
multicore_fifo_push_blocking(0); //Экран 0 нарисован
|
||||||
x+=0.03;
|
x+=0.03;
|
||||||
if (minmax)
|
if (minmax)
|
||||||
@@ -43,8 +43,8 @@ int main() {
|
|||||||
else freq+=0.005;
|
else freq+=0.005;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_pixel(0,0,reverse(0b1111100000000000));
|
|
||||||
|
|
||||||
|
|
||||||
//sleep_ms(20);
|
//sleep_ms(20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user