• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SQLite and SmartButtons
#2
It's not documented as it's not really something that most users would need to mess with (and the database can constantly change, and I don't want another form of documentation that I need to maintain). The zoom values are the amount the file was scaled up or down to fit the screen in each dimension when the button was created. You would need to figure that value out (or estimate it). MobileSheets determines the delta between the current zoom level for the file and what was saved to figure out how to scale the button rendering. That delta is applied to scale the button up or down as needed.

The x and y values are the center point of the button on the screen in scaled coordinates (meaning whatever the coordinates were on the image in the scaled dimensions). So if the button was in the center of a 1200x1600 page, the original file was 600x800 (meaning it was scaled up by a factor of 2), the zoomX and zoomY would be 2.0 and the x and y would be 600 and 800 respectively. You could also just set the zoom factor to 1.0 and use the raw file coordinates for the button placement, and MobileSheets will then just scale the button up. In the past, the scaling was just applied to the canvas, which resulted in a less crisp rendering quality. Later on, the rendering code was modified to change the font size and rounded rect dimensions based on the scaling factor to maintain the better quality, so in theory, the code could be changed to store values in terms of the raw page size with zoomX and zoomY of 1. However, there is no raw page size with text or ChordPro files, which is why it was originally implemented the way it was.

Mike
Reply


Messages In This Thread
SQLite and SmartButtons - by jtoon86 - 05-28-2025, 10:54 AM
RE: SQLite and SmartButtons - by Zubersoft - 05-29-2025, 05:56 AM
RE: SQLite and SmartButtons - by jtoon86 - 05-30-2025, 04:51 AM
RE: SQLite and SmartButtons - by Zubersoft - 05-30-2025, 05:02 AM



Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2025 MyBB Group.