pebble-sdk

Trying to mask APNG background with text

让人想犯罪 __ 提交于 2019-12-25 09:58:33
问题 I am taking Pebble example of working with APNG and trying to mask it with transparent text, so bitmap will show only thru text, but no matter what mask/composite mode I try, bitmap is shown as black-and-white (original animation is in color and shows in color if I don't draw text) Here's a sample code I use in callback SP for the layer that draws text: //creating background and text graphics_context_set_fill_color(ctx, GColorBlack); graphics_fill_rect(ctx, GRect(0, 0, 144, 168), 0,

Trying to mask APNG background with text

青春壹個敷衍的年華 提交于 2019-12-25 09:58:23
问题 I am taking Pebble example of working with APNG and trying to mask it with transparent text, so bitmap will show only thru text, but no matter what mask/composite mode I try, bitmap is shown as black-and-white (original animation is in color and shows in color if I don't draw text) Here's a sample code I use in callback SP for the layer that draws text: //creating background and text graphics_context_set_fill_color(ctx, GColorBlack); graphics_fill_rect(ctx, GRect(0, 0, 144, 168), 0,

How to add an image to a window in Pebble.js?

╄→尐↘猪︶ㄣ 提交于 2019-12-24 07:15:05
问题 The documentation on window (http://developer.getpebble.com/docs/pebblejs/#window) says that we can add an image to it: "Window: The Window by itself is the most flexible. It allows you to add different Elements (Circle, Image, Rect, Text, TimeText) and to specify a position and size for each of them. You can also animate them." An image is an element, but there is no documentation on the image constructor. What parameters does it take? Particularly, how do we specify the image src? Also,

Coordinates of points dividing circle into n equal halves in Pebble

本小妞迷上赌 提交于 2019-12-12 03:17:29
问题 I am trying to divide the circle into n equal parts using straight lines. Idea is to get the coordinates of the end points on the circumference of the circle and then to draw the line. to find coodrinates I am using following code: static void getPoints(int x0,int y0,int r) { double angle = 0; double angleToRadian = 0; for(int i = 0 ; i < noOfDividingPoints ;i++) { angle = i * (360/noOfDividingPoints); angleToRadian = ( angle * 3.141 ) / 180; APP_LOG(APP_LOG_LEVEL_DEBUG, "LOG: Angle: %lf,

Is it possible to display a settings page and communicate with a phone using Pebble.js and CloudPebble?

落花浮王杯 提交于 2019-12-11 06:58:49
问题 Is it possible to get user input on the phone and do something with it and then display some result onto the pebble watch using only Pebble.js and the CloudPebble? For this case I think I would need PebbleKit JS or PebbleKit Android/iOS in order to communicate between the phone and watch.. right? 回答1: Pebble.js is built using PebbleKit JS, so anything you can do with PebbleKit JS can be done in Pebble.js, including settings pages. 回答2: To use CloudPebble, you'll have to make a few changes to

initializer element not constant?

牧云@^-^@ 提交于 2019-12-10 17:54:55
问题 I am relatively knew to C and only learning pieces of it to publish a Pebble C/PebbleKitJS app to track buses. So far I have the data being processed on a Node server, and I am getting ready to have the data processed by a JS File. MY one problem however lies within the C Code. This code process data stored in a Key Dictionary sent from JS and assigns it to a variable for use below. By using #define var 9, I can successfully have the .high value set to 9. But through an int var, it fails and

XMLHttpRequest fails basic authentication

流过昼夜 提交于 2019-12-09 12:39:46
问题 Any idea why XMLHttpRequest with correct credentials in Pebble JS Framework fails basic authentication on Android but works in iOS? Exactly the same code, along the lines of: var req = new XMLHttpRequest(); req.open(method, url, true, user, pass); req.send(data); req.onreadystatechange = function() { ... } Returns 401 in from Android Pebble app, but authenticates correctly in iOS. 回答1: I found a workaround that worked for me on Android. Don’t know why but direct authenticated request: req

Xamarin Obj-C Framework Binding (PebbleKit iOS)

强颜欢笑 提交于 2019-12-07 21:03:15
问题 I try to Bind this (PebbleKit.Framework) Framework to C# with Objecttive Sharpie on the command line. sharpie bind -o Binding -f PebbleKit.Framework -sdk iphoneos8.4 This is working without errors, but how do I get it to bind all Header Files? I just get 3 partial interfaces with name constants (with Verify Attribute). And some NSNumber from PBWatch+Sports.h for Example extern NSNumber *PBSportsTimeKey; Do I have to bind methods and classes manually? 来源: https://stackoverflow.com/questions

iOS: 'PebbleKit/PebbleKit.h' file not found Issue

眉间皱痕 提交于 2019-12-07 18:21:51
问题 I am working with a project which includes Pebble Kit framework. I have two targets in the same project. When I run project on device, it works fine. But as I archive the same project to create an IPA, it shows below error, Lexical or preprocessor error in PebbleWatch.h file, 'PebbleKit/PebbleKit.h' file not found. I cleaned project multiple times & re included the same frameworks in the project by selecting reference two both the projects. How this can be resolved ? 来源: https://stackoverflow

iOS: 'PebbleKit/PebbleKit.h' file not found Issue

喜夏-厌秋 提交于 2019-12-06 12:04:31
I am working with a project which includes Pebble Kit framework. I have two targets in the same project. When I run project on device, it works fine. But as I archive the same project to create an IPA, it shows below error, Lexical or preprocessor error in PebbleWatch.h file, 'PebbleKit/PebbleKit.h' file not found. I cleaned project multiple times & re included the same frameworks in the project by selecting reference two both the projects. How this can be resolved ? 来源: https://stackoverflow.com/questions/27098798/ios-pebblekit-pebblekit-h-file-not-found-issue