I'm Using a Wrapper Library in GMS2 That was made back in GM6 Days (gamemaker) Someone was able to wrap majority of the win32API to use in GM6-8. There is only 1 odd instance in where the WinAPI system seems to mess up when drawing the controls to the Main Application Window.
The desired goal is to draw an image to an Child window and draw a grid defining it's splitting according to the user input EX: 16x16 and having the user select squares VIA Mouse Click + Dragging over the boxes.
Unfortunately I have little to no experience in win32API so i'm a bit lost as to where to start.
Looking over the documentation it looks like he left majority of the script names of the DLL to mimic the format of that when calling in C++ or C (just my assumptions).
From His Documentation he has things like "Drawing System" Which Contains things like "Move Item","Add Line","Add Graphic Buffer" etc... and then other Graphic Buffer functions. But then theres the "Draw" functions which has things like "Draw Fill Rect , DrawSelectObj" etc... he doesn't really provide examples so i'm unsure as to how to use these things together to get my desired results. What is the difference between a drawing system and a draw function? Do I have to use them in conjunction, along with the Graphics Buffer?
Can Someone point in the right direction of the necessary steps to get it done? An Example without code and just the function equivalent will suffice, I just need to know out of which functions to use and then later bind it to the Child Window.
An Example Code from his demo is something like this
GbGradient2 = API_GB_Create (105,105); //Graphics Buffer
DcGradient2 = API_GB_GetDC (GbGradient2);
API_Draw_Gradient (DcGradient2,0,0,105,105,0,c_yellow,c_lime);
BrGradient2 = API_Draw_CreatePatternBrush (API_GB_GetBitmap (GbGradient2));
API_Draw_Gradient (DcGradient2,0,0,105,105,0,c_red,65535);
BrGradient3 = API_Draw_CreatePatternBrush (API_GB_GetBitmap (GbGradient2));
hRectangle = API_DS_AddRectangle (2,5,5,105,105); // Adds a rectangle(Drawing System)
hEllipse = API_DS_AddEllipse (2,5,5,105,105);
hNoPen = API_Draw_CreatePen (PS_NULL,0,0);
API_DS_SetItemBrush (hRectangle,BrGradient2); // Sets the brush
API_DS_SetItemBrush (hEllipse,BrGradient3);
API_DS_SetItemPen (hRectangle,hNoPen); // Sets the pen
API_DS_SetItemPen (hEllipse,hNoPen);
API_Draw_Gradient (GbGradient2,0,0,16,16,0,c_yellow,c_lime);
Lookin at it a little more it looks like the draw functions are linked to GDI somehow.
since GMS2 is a cross platform tool , its windows-only functionality gas been removed.
you can make a nice GUI for that porpose by using GMS2 objects , as you have a little Xp
about Win32 API,this will be easier than that big stuffy coding
here are some tips ,
creating a window object with a rectangle sprite
creating ui objects at the create event of above object
adding some code to the global mouse event
Forgive my ignorance. I'm a web developer tasked with integrating an app with AutoCAD and I have no experience with the software or CAD files in general.
I have hooked it up to A360 and the Forge APIs and now I'm looking to modify drawings using scripts uploaded to the Design Automation API. What I need to do is add part numbers and some other data generated by the app to the drawings. I have the following script I've managed to get working which is a very basic version of what I need to achieve.
; Add a label to a drawing
-mtext 0,300 400,310 App data
Tag No: P1234567
Created: 29/09/16
; Define Attribute
-attdef
i
P1234567
tag
-
0,200
10
0
; end
This script adds an MTEXT and ATTDEF to a drawing with a bit of basic data. What I want to do is position the labels at the bottom right of the drawing.
Is it possible to get the position of the drawing from somewhere so the script can figure out where the bottom right is? Ideally it needs to work no matter where the creator has positioned the drawing.
Bonus points: I'd also like to put this data into the drawing metadata somehow, would this be beneficial and how would be the best way to achieve this?
Thanks in advance.
If you would still like to do it in Modelspace, and you can control the drawings, it is possible to achieve this by finding the position of blocks with specific names.
Example: http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-a-block-and-get-it-s-insertion-point/m-p/3309261#M302014
id like to make an editor similar to OmniGraffle. Basic functionality:
1) add objects
2) live resize objects
3) per object context menu
4) ability to connect objects with a curve so dragging one object would constantly redraw connected curve
Is there any open source libs for that? If not, how do i make my own? Each object should be represented by a layer or it has to be drawn using CG or maybe i'll need display link. Please advice
To start with, you can refer the Sketch example from Apple Developer Examples.With Mac OS 10.6.x, it is available in the folder /Developer/Examples
This example has basic events handling like drawing on mouse Down etc .
I know microsoft provides a bing map control.
And ESRI has a map control for wp7.
Are there any other map controls?
What other sort of Map control do you want? The Bing Maps control is highly extensible allowing you to create tile sources for all sorts of other mapping data. For example you can use it to render Google Sky tiles:
http://www.scottlogic.co.uk/blog/colin/2011/02/google-sky-on-windows-phone-7/
I know that ThinkGeo are planning on releasing their mapping control for Windows Phone but I'm not sure when.
I also need something that can display tiles link Bing but also shape files from ESRI.
Have a look at the bottom of this thread
So basically I am trying to create a custom GPS map for my WP7 application. I did find a great website with step by step instructions.
But in this example they used a program called OziExplorer. I tried to get this program and now i have 3versions of it. which are(I don't know which to use):
oziexplorer 3d
oziexplorer ce
oziexplorer pc
What i figured was that oziexplorer can only be used for windows pocket pc meaning winmo6.5 so i dont know if this is compatible with WP7.
I did find another website where an actual wp7 app has been released that allows a user to take a picture of a map and calibrate it with 2 points of location and the image can then be used as a gps map.
If anyone could possibly point me in the right direction as to how to begin creating a custom map to use in a wp7 app I would be ever so grateful. The map is supposed to be a map of a park.
Thanks in advance for everyones help and sorry if i sound like a noob..its just google has finally failed me..
Regards
shan
One approach I've seen for making map tiles is to use Microsoft MapCruncher - see http://research.microsoft.com/en-us/um/redmond/projects/mapcruncher/ and http://www.bdcc.co.uk/GoogleCrunch/Crunch.htm - this enables you to build custom tiles for an overlay.
This blog - http://dotnetbyexample.blogspot.com/2010/10/showing-open-source-maps-on-windows.html - tells you how to show custom tiles within the Bing Maps Silverlight viewer.
I would guess (don't know) that OziExplorer tiles could be used in this way - you just need to find a way to map the tile co-ordinates to a custom tile layer.
Another option for you is to use OpenStreetMap data:
You can use CloudMade's services - www.cloudmade.com - to produce map tiles with customised look-and-feel.
You can produce your own tiles using MapNik - but (as I'm sure you are already aware) the processing and storage size needed for map tiles is large