0

cloudpebble でコンパイル エラーが発生して困っています。

GBitmap のピクセル データへのポインタを取得したいと思います。

static void canvas_update_proc(Layer *layer, GContext *ctx) {
    // Custom drawing happens here!
    GBitmap *fb = graphics_capture_frame_buffer(ctx);

    // Manipulate the image data...
    GRect bounds = layer_get_bounds(layer);

    uint8_t *byte_offset = (uint8_t *)fb->addr;   // <------- error

    int skip_bytes = fb->row_bytes_size - bounds.size.w; // <------- error

コンパイラはこのエラーを返します。

../src/c/hello_world.c: In function 'canvas_update_proc':
../src/c/hello_world.c:25:38: error: dereferencing pointer to incomplete type
../src/c/hello_world.c:27:24: error: dereferencing pointer to incomplete type

このytビデオをチェックしていました。https://youtu.be/lYoHh19RNy4?t=2473

これをどのように解決すればよいですか?


グーグルで調べていたので、GBitmap と関係があるのではないかと思いますが、不明ですか? (少なくともメンバー?)

4

1 に答える 1