请达人帮忙翻译一下啊··汉译英

来源:百度知道 编辑:UC知道 时间:2024/05/18 00:32:04
内存的控制除了对代码进行最大限度的优化外,还有下面几个传统合理使用内存的方法: 减少对象的创建,最好能重用对象;最大程度保证图片质量的同时减少图片大小;不要试图在初始化的时候把所有Form或者Canvas对象都读入内存中,而应该在需要的时候再创建;对象一旦不需要使用就及时将其置为null,便能够被垃圾处理器回收,对于不使用的对象,千万不要让正在使用的对象指向它,以免内存得不到回收等。
3 通过图形处理技术进行优化
对于一款手机程序来说,图形处理技术是一个永恒的话题。本文提供以下几种图形处理技术。
3.1基于J2ME的图片放大缩小
手机的屏幕大小因不同厂商、不同型号而不尽相同。因此,同一张图片怎样在不同大小屏幕的手机上合理地显示出来对一款游戏来说是相当重要的。图片缩小的操作是删除部分像素点 小图放大则要人为地添加一些像素点。如把一个2×2的图片放大成4×4的图片。图片放大并不总是成倍的,比如从2×2放大到3×3。
在移植到不同的手机时可以先用getWaith()及getHeight()取得当前手机屏幕的宽度和高度,如要当前图片不够满屏显示时就对图片进行放大,相反就进行缩小,也可自定义屏幕显示图片的大小,如在屏幕上显示多张图片的缩略图,使图片方式的显示更加丰富。灵活使用J2ME的图形处理技术,可以优化手机程序图形显示,减少游戏对手机资源的占用等,降低了手机程序对手机硬件配置的要求;既丰富了手机程序的图像效果,又增加了手机程序的可移植。

The memory of control in addition to maximize the code below, and the optimization of the rational use of several traditional memory method: reduce the object, best can reuse objects, Maximum guarantee the quality of images and reduce image size, Do not attempt to initialize all Form or objects into memory parlance, and should in time of need to create, An object once need not use will promptly to null, the garbage can, for not using recycled processor, don't let the object is used to it, lest memory get recycling, etc.
3 through graphics processing technique is optimized
For a mobile phone, graphics processing technology program is an eternal topic. This paper provides the following graph processing technology.
Based on the J2ME 3.1 zoom-in pictures
Mobile phone screen size for different manufacturers, different types and different. Therefore, with a picture of how the different size on the phone screen display properly in a game is very important. Pictures