Pebble Foundation Classes
0.2.0
C++ for Pebble
|
82 operator ::GContext*()
const {
return gcontext_; }
147 graphics_draw_text(gcontext_, text, font, box, overflow_mode, alignment, text_attributes);
162 graphics_draw_text(gcontext_, text.c_str(), font, box, overflow_mode, alignment,
nullptr);
178 graphics_draw_text(gcontext_, text.c_str(), font, box, overflow_mode, alignment, text_attributes);
void graphics_context_set_antialiased(GContext *ctx, bool enable)
void graphics_draw_pixel(GContext *ctx, GPoint point)
void graphics_text_attributes_destroy(GTextAttributes *text_attributes)
Destroys a previously created instance of GTextAttributes.
void graphics_draw_arc(GContext *ctx, GRect rect, GOvalScaleMode scale_mode, int32_t angle_start, int32_t angle_end)
static GSize GetContentSize(const std::string &text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode, const GTextAlignment alignment, const GTextAttributes &text_attributes)
Definition: pebble_graphics_context.hpp:238
void graphics_draw_circle(GContext *ctx, GPoint p, uint16_t radius)
void DrawText(const char *text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode, const GTextAlignment alignment, const GTextAttributes &text_attributes) const
Definition: pebble_graphics_context.hpp:145
void DrawText(const std::string &text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode=GTextOverflowModeWordWrap, const GTextAlignment alignment=GTextAlignmentLeft) const
Definition: pebble_graphics_context.hpp:160
static GSize GetContentSize(const char *text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode, const GTextAlignment alignment, const GTextAttributes &text_attributes)
Definition: pebble_graphics_context.hpp:207
GBitmap CaptureFrameBuffer()
A shortcut to capture the framebuffer in the native format of the watch.
Definition: pebble_graphics_context.hpp:293
void DrawCircle(GPoint p, uint16_t radius) const
Definition: pebble_graphics_context.hpp:268
void DrawBitmapInRect(const GBitmap &bitmap, GRect rect) const
Definition: pebble_graphics_context.hpp:290
void graphics_text_attributes_enable_paging(GTextAttributes *text_attributes, GPoint content_origin_on_screen, GRect paging_on_screen)
void DrawArc(GRect rect, GOvalScaleMode scale_mode, int32_t angle_start, int32_t angle_end) const
Definition: pebble_graphics_context.hpp:357
void RestoreDefaultPaging()
Definition: pebble_graphics_context.hpp:49
void graphics_text_attributes_restore_default_paging(GTextAttributes *text_attributes)
FontInfo * GFont
Definition: pebble.h:4615
void SetStrokeWidth(uint8_t stroke_width) const
Definition: pebble_graphics_context.hpp:117
bool graphics_frame_buffer_is_captured(GContext *ctx)
GTextAttributes * graphics_text_attributes_create(void)
static GSize GetContentSize(const char *text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode=GTextOverflowModeWordWrap, const GTextAlignment alignment=GTextAlignmentLeft)
Definition: pebble_graphics_context.hpp:191
GBitmap * graphics_capture_frame_buffer(GContext *ctx)
void FillCircle(GPoint p, uint16_t radius) const
Definition: pebble_graphics_context.hpp:273
GContext(::GContext *ctx)
Wraps an existing graphics context.
Definition: pebble_graphics_context.hpp:77
void graphics_fill_rect(GContext *ctx, GRect rect, uint16_t corner_radius, GCornerMask corner_mask)
void DrawText(const char *text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode=GTextOverflowModeWordWrap, const GTextAlignment alignment=GTextAlignmentLeft) const
Definition: pebble_graphics_context.hpp:129
GOvalScaleMode
Definition: pebble.h:4099
void graphics_draw_bitmap_in_rect(GContext *ctx, const GBitmap *bitmap, GRect rect)
An unowned bitmap.
Definition: pebble_graphics_types.hpp:286
void graphics_draw_line(GContext *ctx, GPoint p0, GPoint p1)
GSize graphics_text_layout_get_content_size_with_attributes(const char *text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode, const GTextAlignment alignment, GTextAttributes *text_attributes)
GTextAlignment
Definition: pebble.h:4676
void RestoreDefaultTextFlow()
Definition: pebble_graphics_context.hpp:37
void graphics_context_set_stroke_color(GContext *ctx, GColor color)
void SetAntialiased(bool enable) const
Definition: pebble_graphics_context.hpp:109
void graphics_context_set_stroke_width(GContext *ctx, uint8_t stroke_width)
GBitmapFormat
The format of a GBitmap can either be 1-bit or 8-bit.
Definition: pebble.h:3428
virtual ~GTextAttributes()
Destroys the underlying pebble GTextAttributes.
Definition: pebble_graphics_context.hpp:29
void DrawRect(GRect rect) const
Definition: pebble_graphics_context.hpp:254
void graphics_draw_text(GContext *ctx, const char *text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode, const GTextAlignment alignment, GTextAttributes *text_attributes)
void graphics_draw_rotated_bitmap(GContext *ctx, GBitmap *src, GPoint src_ic, int rotation, GPoint dest_ic)
void FillRect(GRect rect, uint16_t corner_radius, GCornerMask corner_mask) const
Definition: pebble_graphics_context.hpp:263
::GTextAttributes * text_attributes_
Underlying GTextAttributes.
Definition: pebble_graphics_context.hpp:65
void graphics_fill_radial(GContext *ctx, GRect rect, GOvalScaleMode scale_mode, uint16_t inset_thickness, int32_t angle_start, int32_t angle_end)
Definition: pebble_graphics_types.hpp:5
GCornerMask
Definition: pebble.h:3955
void FillRadial(GRect rect, GOvalScaleMode scale_mode, uint16_t inset_thickness, int32_t angle_start, int32_t angle_end) const
Definition: pebble_graphics_context.hpp:376
@ GTextAlignmentLeft
Aligns the text to the left of the drawing box.
Definition: pebble.h:4678
static GSize GetContentSize(const std::string &text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode=GTextOverflowModeWordWrap, const GTextAlignment alignment=GTextAlignmentLeft)
Definition: pebble_graphics_context.hpp:222
void graphics_context_set_compositing_mode(GContext *ctx, GCompOp mode)
GBitmap * graphics_capture_frame_buffer_format(GContext *ctx, GBitmapFormat format)
void DrawText(const std::string &text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode, const GTextAlignment alignment, const GTextAttributes &text_attributes) const
Definition: pebble_graphics_context.hpp:176
bool graphics_release_frame_buffer(GContext *ctx, GBitmap *buffer)
void graphics_draw_round_rect(GContext *ctx, GRect rect, uint16_t radius)
void graphics_context_set_text_color(GContext *ctx, GColor color)
void DrawLine(GPoint p0, GPoint p1) const
Definition: pebble_graphics_context.hpp:250
Definition: pebble_graphics_types.hpp:71
Definition: pebble_graphics_context.hpp:73
void EnableScreenTextFlow(uint8_t inset)
Definition: pebble_graphics_context.hpp:44
bool ReleaseFrameBuffer(const GBitmap &buffer)
Definition: pebble_graphics_context.hpp:326
GBitmap CaptureFrameBuffer(GBitmapFormat format)
Definition: pebble_graphics_context.hpp:317
GCompOp
Definition: pebble.h:3761
void graphics_context_set_fill_color(GContext *ctx, GColor color)
GSize graphics_text_layout_get_content_size(const char *text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode, const GTextAlignment alignment)
void EnablePaging(GPoint content_origin_on_screen, GRect paging_on_screen)
Definition: pebble_graphics_context.hpp:61
void SetFillColor(GColor color) const
Definition: pebble_graphics_context.hpp:90
void SetCompositingMode(GCompOp mode) const
Definition: pebble_graphics_context.hpp:104
bool FrameBufferIsCaptured()
Definition: pebble_graphics_context.hpp:332
Definition: pebble_graphics_context.hpp:18
void graphics_text_attributes_enable_screen_text_flow(GTextAttributes *text_attributes, uint8_t inset)
void DrawPixel(GPoint point) const
Definition: pebble_graphics_context.hpp:245
GTextAttributes()
Creates an instance of GTextAttributes for advanced control when rendering text.
Definition: pebble_graphics_context.hpp:22
Definition: pebble_graphics_types.hpp:33
void SetStrokeColor(GColor color) const
Definition: pebble_graphics_context.hpp:86
@ GTextOverflowModeWordWrap
Definition: pebble.h:4663
void SetTextColor(GColor color) const
Definition: pebble_graphics_context.hpp:94
Definition: pebble.h:3268
void graphics_fill_circle(GContext *ctx, GPoint p, uint16_t radius)
void graphics_text_attributes_restore_default_text_flow(GTextAttributes *text_attributes)
void DrawRotatedBitmap(const GBitmap &src, GPoint src_ic, int rotation, GPoint dest_ic) const
Definition: pebble_graphics_context.hpp:344
GTextOverflowMode
Definition: pebble.h:4660
void DrawRoundRect(GRect rect, uint16_t radius) const
Definition: pebble_graphics_context.hpp:278
void graphics_draw_rect(GContext *ctx, GRect rect)