在各种WP设备上绘制应用程序中的图像(不同分辨率) [英] Scaling Images in a drawing app on various WP devices (varying resolutions)

查看:82
本文介绍了在各种WP设备上绘制应用程序中的图像(不同分辨率)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在为WP8的绘图应用程序开始开发。

I am starting development on a drawing app for WP8.

绘图大小始终为300x600像素,我使用加载到用户将绘制的画布上的背景图像,包​​括背景的完整图形将保存为位图。

The drawing size is always 300x600 pixels and I use a background image loaded into the canvas on which the user will draw, this complete drawing including the background will be saved as a bitmap.

绘制项目时(线条,弧形,等等,项目的坐标作为项目信息的一部分存储在绘图对象中。

As items are drawn (line, arc, etc), the co-ordinates of the items are stored as part of the item info in the drawing object.

我还没有WindowsPhone,只有模拟器,无法测试这个但是......

I don't have a WindowsPhone yet, only the emulator and cannot test this but...

问题:当在一个应用程序中以768×1280分辨率运行时,绘制一个不同的项目时,是否收集了坐标在720×1280分辨率下?

Question: Are the co-ordinates gathered when drawing an item different when running in one app in say a 768 × 1280 resolution to one running in a 720 × 1280 resolution?

我是否需要对用户绘制的对象(线,弧等)进行特殊缩放(特定分辨率的不同背景图像除外)?

Do I need to do special scaling (other than different background images for specific resolutions) of user-drawn objects (line, arc, etc)?

这是因为用户可以在一个WP上绘图,发送给具有不同WP的同事并且绘图必须是同样的。位图无关紧要但是在同一个应用程序中的
手机上需要读取和打开包含序列化绘图数据的xml文件(重新创建绘图),因此缩放问题。

This is because a user might draw on one WP, send to a colleague with a different WP and the drawing must be the same. Bitmaps won't matter BUT an xml file containing the serialised drawing data needs to be read and opened (recreating the drawing) on both phones in the same app, hence the scaling question(s).

谢谢

推荐答案

您是否有机会阅读
多分辨率应用程序
文档?

Have you had a chance to read the Multi-resolution apps documentation?

如果您正在编写XAML应用程序,UI可以自然地自动进行,除非您努力代码尺寸。

模拟器有多个版本,因此您可以轻松进行实验。

If you are writing a XAML app, the UI can naturally autofit, unless you hard code dimensions.
The emulator has several versions so you can easily experiment.

-Mark


这篇关于在各种WP设备上绘制应用程序中的图像(不同分辨率)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆