cloudpebble

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,

Accessing firebase using cloud pebble (Pebble.js)

 ̄綄美尐妖づ 提交于 2019-12-12 06:12:51
问题 I've been trying to figure out a way to access data from firebase to display in a pebble app, using cloud pebble. I'm not quite sure how to do so as I'm relatively new to javascript and the pebble platform. 回答1: You can require remote URI's using the following syntax: require('//cdn.firebase.com/js/client/2.2.9/firebase.js'); The other (more traditional) way to work around this is to copy-paste the source code of the library you want to use at the top of your JavaScript file. Your best bet to

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

Including an external javascript library in pebble js file?

梦想与她 提交于 2019-12-01 23:03:29
问题 Is there any way I can include an external JS library in my pebble code? Conventionally on a webpage I would do this in my head tags: <script type='text/javascript' src='https://cdn.firebase.com/js/client/1.0.11/firebase.js'></script> But in pebble, I am unable to do that since I am only using JS. So how can I include an external library for a JavaScript file. 回答1: At present, you cannot include external JS files. If you're using CloudPebble, then the only way to do this is to copy and paste