Is it possible to rotate dc.drawText at 45 degrees?
the date of my watch is at 45 degress and my numbers are 90. is it possible to rotate the numbers?
if tried to rotate the font but when its double digits the are not aligned.
Is it possible to rotate dc.drawText at 45 degrees?
the date of my watch is at 45 degress and my numbers are 90. is it possible to rotate the numbers?
if tried to rotate the font but when its double digits the are not aligned.
im displaying heartrate, steps, battery and floors climed in onupdate.
drawables is like this
<drawables>
<bitmap id="LauncherIcon" filename="launcher_icon.png" />
<bitmap id="Background" filename="backgroundNy.png">
<palette disableTransparency="true">
<color>000000</color>
<color>FFFFFF</color>
<color>AAAAAA</color>
<color>2f2f2f</color>
</palette>
</bitmap>
</drawables>
the png file is 44.2kb
hmm og heres my onupdate and initialize
function initialize() {
WatchFace.initialize();
middleX = 120;//$.gDeviceSettings.screenWidth/2;
middleY = 120;//$.gDeviceSettings.screenHeight/2;
deviceStyle = $.gDeviceSettings.screenShape;
retrieveSettings(); // retrieve the user's settings for this watch face
font1 = Ui.loadResource(verdana50);
font2 = Ui.loadResource(sawade20);
fsyms = Ui.loadResource(typicons22);
}
function onUpdate(dc) {
// if the settings are flagged as having changed (which is set in the AppBase object),
// then retrieve the settings again
if ($.gSettingsChanged) {
$.gSettingsChanged = false;
retrieveSettings();
}
// handle allocation or deallocation of the off-screen buffers, as required, based on any changes
// to settings and/or time issues rendering
if (Toybox.Graphics has :BufferedBitmap) {
if (cDisplaySecondHand == 2 && $.gPartialUpdatesAllowed && dcOffscreenBuffer == null) {
// if configured for always on, and it's allowed and the buffer is null then the
// user may have switched so allocate the required buffers
allocateOffscreenBuffer(dc);
} else if (cDisplaySecondHand < 2 || !$.gPartialUpdatesAllowed) {
// clear any DC clipping and deallocate the off-screen buffers if they are not
// (or are no longer) needed
dc.clearClip();
deallocateOffscreenBuffer();
}
}
// get local time
var timeNow = Time.now();
var localTimeInfo = Time.Gregorian.info(timeNow, Time.FORMAT_MEDIUM);
clockTime = localTimeInfo;
// set the day of week and day of month strings
var dayOfMonthStr = localTimeInfo.day.format("%2d");
// set the targetDc object to use for rendering; if doing the always on second hand then
// we want to ensure that we update the offscreen buffer, since we have an updated minute
// hand (and potentially the hour hand also)
var targetDc;
if (dcOffscreenBuffer != null && $.gPartialUpdatesAllowed) {
dc.clearClip();
dcCurClip = null;
targetDc = dcOffscreenBuffer.getDc();
} else {
targetDc = dc;
}
// clear the screen
targetDc.setColor( Gfx.COLOR_TRANSPARENT, Gfx.COLOR_BLACK );
targetDc.clear();
// draw the background
targetDc.drawBitmap(0,0,resBackground);
// draw the date bar with day of week/month
GetBattery(targetDc);
GetHeartRate(targetDc);
GetSteps(targetDc);
GetFloors(targetDc);
GetSymbols(targetDc);
ShowDates(targetDc, dayOfMonthStr);
// draw the background and hands
drawBackground(dc);
drawHands(dc, 120, 120, clockTime);
if (updateSeconds || ($.gPartialUpdatesAllowed && dcOffscreenBuffer != null)) {
// draw the second hand, if configured
//drawAnalog(dc);
//drawSecondHand(dc, 120, 120, clockTime);
DrawSec(dc);
drawHandCenter(dc, 120, 120, true);
} else {
// otherwise, just draw the center rings
drawHandCenter(dc, 120, 120, false);
}
}
from the eclipse program
Error: Out Of Memory Error
Details: Failed loading application.
and sometimes when i try to use polygons it says
BUILD: ERROR: PRG generated exceeds the memory limit of 'background' applications for device id 'marqadventurer': 40292 bytes.