This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Please help ME


Please help ME

Postby saurabhinindia » Jun 5, 2002 @ 9:49pm

hi!

i am new to Pocket PC world!

I need your help. Suppose i have to draw some rectangles, circles on the screen (using EVC) and now i want the user to select/mark some objects (like freehand using a stylus..)

How can i do that?

Please let me know.


Thanks

PS: do you know any links of the tutorial related to that?
saurabhinindia
pm Member
 
Posts: 1
Joined: Jun 5, 2002 @ 8:34pm


Samples in eVC

Postby Conan » Jun 5, 2002 @ 10:55pm

What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby Dan East » Jun 6, 2002 @ 12:28am

Well, I can't provide any source, and don't know of any specific sites dealing with that type of thing. I can give you a few suggestions though.

What you are trying to create is an object-oriented, or vector paint program. In other words each graphic construct is represented internally by a virtual object, and is rendered to a bitmap for output to a display or printer. This is in contrast to a simple raster paint program, such as the one included with Windows, which just colors in pixels based on drawing activity. The latter scheme makes it impossible to manipulate individual drawing objects, because there is nothing to segregate them from one another.

Basically when the user "draws" they create an object, such as a rectangle. Instead of just drawing the pixels to the bitmap you store the rectangle's properties, such as the coordinates of the top-left corner and its size. In addition you can keep track of the thickness of the lines, line color, interior fill, etc.

Then when the user is in "select" mode, your software needs to map screen coordinates to objects. You will have to decide if the user must click on what is the border of the object, or if they can select by clicking on the interior as well.

You will also need a layer system to control the order of objects, which determines which objects are on top of other objects. That is pretty simple, as you just store all the objects in a linked list, with one end of the list representing the bottom, and the other the top. When drawing you render from bottom to top, when determining what the user clicked on, you do it in reverse.

Maybe that will get you on the right track. :)

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby Digby » Jun 7, 2002 @ 5:01pm

Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Postby Dan East » Jun 7, 2002 @ 5:09pm

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron