Archived:Behavior of reference pixel methods on Series 40 3rd Edition devices (Known Issue)
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.
The article is believed to be still valid for the original topic scope.
The article is believed to be still valid for the original topic scope.
Article Metadata
Tested with
Devices(s): Nokia 6111, Nokia 6125, Nokia 6131, Nokia 6136, Nokia 6151, Nokia 6233, Nokia 6234, Nokia 6265, Nokia 6270, Nokia 6280, Nokia 7370, Nokia 5200, Nokia 6085, Nokia 6086
Compatibility
Platform(s): Series 40 3rd Edition, Series 40 3rd Edition, FP1, and Series 40 3rd Edition, FP2
Nokia Series 40 3rd Edition, Feature Pack 1 emulator
Nokia Series 40 3rd Edition, Feature Pack 1 emulator
Article
Created: User:Technical writer 1
(21 Sep 2006)
Last edited: hamishwillee
(15 Jun 2012)
Overview
The methods defineReferencePixel() and setRefPixelPosition() do not position the Sprite correctly.
Description
The defineReferencePixel() and setRefPixelPosition() methods are used to position and transform the Sprite relative to a reference pixel. Initially the reference pixel is located in the upper left corner of the frame.
The implementation on the above-mentioned devices does not operate correctly, which causes the Sprite to be placed in an incorrect location on the screen.
Solution
Detect the phone model with SystemProperty("microedition.platform") and if the phone model matches one of the models above, use your own Sprite positioning function (by adding the refPixel coordinates to the Sprite coordinates).

