hey i has a method that allows the user to click hold and drag the screen across and translates the screen, there is also a zoom function. nodes are created and stored in an arraylist which are basically rects with text are created and move with the screen as required. the problem is a mouse over function doesnt translate with then (the nodes actual x,y,h,w). the zoom works because its a decimal number multiplied by the x,y so on.
The draw in the main program and translate functions
it takes the border or the rect and multiplies by the zoom but i not sure how the click drag effects them. ive tried multiplyin by centerX and centerY but this didnt work logically im confused any suggestions?
hey im tryin to export from processing to an application i have 3classes one contains the setup() ansd draw() the other 2 are objects. i clicked on the export to application and it creates the new folder but when i click the app it does nothin. i tried adding at the top of the class with draw() and setup()
PROJECT_PROTOTYPE is the name of the class do i need to add the other 2 with commas or add .PDE at the end?
Another thought i had that might be the problem might be to do with the fact that im reading a text file to create instances and draw. ill need the user to place thier file into the program and the program also creates a few new text files when it runs, can this be done?
hey ive done my second project in processing and i gotta say it can be awkward but i do like using it.
i will have to show me projects to a number of people as they pick it apart and then again to a number of people from industry. i was wondering what way or how to best to show the prroject like as an application or in a web page?
The project has 4classes reads a txt file and writes a new one while also visualizing data.
hey ive got to ArrayLists one is a node which holds the details of the node like id name and so on. the second arraylist holds the connection of these nodes or there family. the family contains a dad, mam and any number of children.
what m trying to do is start with the first node which is a dad and connect it to the mam but there seems to be a problem when comparing the strings.
ive printed the start.nodeID and f.dad and they are the same, its probably a simple problem ive just bin lookin at it to long to see it any suggestions?
Node start = (Node) nodes.get(0); for(Family f : famlies) { println(start.nodeID); println(f.dad); if(start.nodeID == f.dad) { println("he is a daddy"); if(f.mam != "") { println("There is a mammy"); for(Node n : nodes) { if(f.mam == n.nodeID) { println("Mammy printed"); n.formatNode(); n.draw(); } } } } }
hey im doing a project where nodes are created in a list, each node is basically a rect(x,y,w,h). The nodes are drawn with no trouble there is a zoom in/out function using UP/DOWN key and also the ability to move the screen by clicking,holding and dragging. I wish to have the cursor set to an ARROW as normal when it is over a node i wish it so to HAND and when the mouse is pressed outside of a node changed to CROSS.
This is code from the button class which takes into account the zoom function (still have to account for the clicking and moving screen). This works and when the mouse is clicked the CROSS is shown, but the hand still shows when the cursor is moved into then out of the node.
I tried adding an else so the code looks like 2 but this then makes the cursor flicker when its over a node, maybe because the curson is being told 2or moore things at once? i will also have to add a click event to the node as seen in 3 it is only in development
hi i have red in a .ged file which consists of a number at the start of each line (0,1,2 or 3) i want to check to see if it is a 0 so i can then print a part of that line but my head is melted from alot of work and i cant even think im pretty sure its really simple but i just cant see it here is the code.
hey im doing a simple program that zoom in and out with the click of 2 buttons which I will eventually add to a larger program. Problem is when the buttons are pressed it zooms in/out but only on the click. I no the pushMatrix() and popMatrix() should be used but im not sure where exactly to put it. This is the method.