![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Open Source Projects The place to discuss Basic4ppc open source applications. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
This is something I started and need a lot of help with. I put a wordpad file and source code with dll's that I started with. The wordpad file discribes the basic way I have it set up to function with whats done so far.
edit: updated zip file.
__________________
Using 6.30 dennishea
Last edited by dennishea : 05-27-2008 at 04:07 PM. |
|
|||
|
Hi dennishea,
I like the idea once the application could produce an accurate scaled drawings. It will be useful for its scale accurateness once printed-out on several paper sizes. Once the application have zoom and pan feature, then this is way to go! By the way...have you thought that the application should have drawing operation steps or style based on some popular CAD applications, like AutoCAD, Microstation or similar? Best regards,
__________________
Rioven Sony Ericsson XPERIA X1i WM6.1 480x800 Display Resolution with QWERTY keyboard |
|
|||
|
@klaus & rioven
PHP Code:
![]()
__________________
Using 6.30 dennishea
|
|
||||
|
Hi dennishea,
Yes, now the light is switched on ! To do what you want to do, you need to use vector graphics. In vector graphics the points are stored in a list with their physical coordinates, the point index is it's position in that list. Lines are referred to these points and the graphic is a 'just' a display of it. The accuracy is garantied by the physical values. In bitmap graphics you 'just color dots' the pixels. If you want to zoom you loose accuracy. What do I mean with indexes? Take the example of a line: The line is determined by two points: let's say point 3 and point 4 in the point list, 3 and 4 are the indexes. In the line parameters the points are referred to by their position in the point list rather than with the points coordinates. A same point can belong to more than one line. The line belongs to a surface, in the surface parameter only the position of the line in the line list is stored. I will look to make a first sample how I would see a program like this, and submit it as soon as there is something testable. Best regards.
__________________
Klaus Switzerland Last edited by klaus : 05-25-2008 at 04:51 PM. |
|
|||
|
Hi Klaus and Dennishea
What I have done is to give the user an input sheet, where the person can enter the limits of the 4 corners of the screen. I then calculate a ratio between the screen size and the limits entered. This constant is then applied to the X and Y positions on the screen. The drawing information that is kept in the database is still correct, but when it gets plotted on the PPC, it gets adjusted by this ratio. ![]() Vice versa is also true. When you plot a line on the PPC, it gets adjusted by this ratio...i.e. line(1000,1000,2000,2000) will get plotted on the screen as (50,50,100,100) depending on the ratio. I should finish all the basic drawing stuff (lines, circles, arc...) by the end of the week and I will post it here again. I have not given the zoom functions much attention yet. Thanks Michael |
|
||||
|
Hi Micheal,
Having a scaling factor for the pixel with the physical area and the display pixel dimensions was obvious to me. For me the open question was, when the these parameters are defined the scaling factor is given and there is no way to change it afterwords. And also in connection with the zoom. Hi dennishea, In all my programs I use variables for the parameters and save them just in simple text files. At loading I allocate the values to the variables. I used, until now, tables only when I needed them to display data. Best regards.
__________________
Klaus Switzerland Last edited by klaus : 05-28-2008 at 10:15 AM. |
|
|||
|
Hi klaus & ceaser
At klaus Do you mean like an ini file for setting variable default or last used settings? Like default grid size, drawing size, inches or mm's, etc etc. In auto cad lite I believe min x,y or 0,0 is bottom left and max top right. Drawing size would be determined by the size of what I'm drawing. I'm assuming that the data you save would also contain drawing size, weather it was set up in inche 's or mm's with the coordinates of your lines, circles, arcs, and what not following. The table I've created holds the beginning and end points for lines, the center xy beginning angle end angle and radius for arc, and xy center and radius for circles. If there is a more efficient way of saving all the coordinates I would really like to learn it, the reason I used table is because it was the easiest for me. I will create and ini file for settings I want a template to start with and if I change them the changes can stay with that drawing file. I am just giving information for why I did what I did and if it's not the best direction for this type of program I would appreciate any help getting pointed in the right direction. At ceaser I like your image buttons. They do give visual support that this is a cad like program. In order to get the program to fire up I copied your zoomall jpg to create zoomin, zoomout and zoombox so the program would fire. I haven't tried to look thru it to see what works. Thanks again for the support and help you both have given. Denny ![]()
__________________
Using 6.30 dennishea
Last edited by dennishea : 05-28-2008 at 01:38 PM. |
|
||||
|
In my mind there would be 3 files.
- An *.ini, init file saving the general parameters of the program, independant of the drawing data. Like: - Do you want to be prompted before leaving the program ? - Load the last used file at start-up ? - Selcted language etc. - A *.cfg , configuration file for the general parameters of the drawing (grid size, darwing size etc.) with the last used values. But these parameters must also be saved in the *.dat file. - A *.dat or any other extension (*.c2d for example), the data of the geomety, this file must include the congig data used for that particular drawing. But, when beginning a new drawing the user can choose another configuration. An example of how I use this is in the Wine Cellar application Wine cellar manager, where the *.cfg files exist in different languages. Wine.ini init file WineE.cfg english config file WineF.cfg french config file *.vin data files. All these files are simple text files. That's, for me, the simple way to do it. I hope that in a few days I will have something to show. At the moment I am still defining the user interface and the data structure. Best regards.
__________________
Klaus Switzerland |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sketch drawing program | klaus | Share Your Creations | 5 | 11-11-2008 04:55 PM |
| Back to the drawing board ...... | taximania | Chit Chat | 13 | 06-17-2008 11:55 AM |
| Pen width and XOR drawing | enonod | Questions & Help Needed | 2 | 06-01-2008 07:43 PM |
| drawing on/in gamewindow | enonod | Questions & Help Needed | 2 | 05-25-2008 11:28 PM |
| RPaint - Drawing tool | Stanl3yCZ | Share Your Creations | 0 | 01-21-2008 02:54 PM |