Forum Replies Created
-
AuthorPosts
-
I will. Thanks.
Did you see the one I posted above?
@nerobot You are doing a great job. I hope you don’t give up any time soon. I know how hard and tedious ironing out bugs can be.
So far I have enjoyed working with it.
Hey Nerobot, Monday I downloaded the latest from Github and compiled it. Today I was testing it writing some code. I was doing a run with about 300 lines of code then I decided to move some code from one area to another and after I did that I pressed the tab key and it just close the app with out notice. so I lost all of the code I was working on. I tried to duplicate the crash but it just doesn’t want to do it anymore. It has done that a couple of times. I can’t recall what the other reason for closing was but it wasn’t for the same reason. it has only been doing that on the latest download it had never done that before.
this is on Mac OSX.
[edit]
I think I figured one out:
when I select several lines of code and I press tab to indent the code it crashes.check to see if you have developer tools installed and install them with this:
open a terminal and paste this to it and press enter:xcode-select —install
the “–install” supposed to have two “-“
to scale:
[/crayon]Monkey123[crayon-5cbaa0c63051f451170819 inline="true" ]canvas.Scale = new Vec2f(x,y)or
[/crayon]Monkey123[crayon-5cbaa0c630524595052646 inline="true" ]image.Scale = New Vec2f(x,y)to grab a section of an image:
[/crayon]Monkey123[crayon-5cbaa0c630529694928906 inline="true" ]local img:Image = new Image(image,x,y,width,height)It’s not programed in to mojo. you will have to implement it yourself.
Thanks, That works perfect.
as a test I am trying to plaster an image of a rectangle with an x on it but can quite figure it out.
This is what I got:
[/crayon]Monkey123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960[crayon-5cbaa0c639f21985306155 inline="true" ]Namespace myapp#Import "<std>"#Import "<mojo>"Using std..Using mojo..Class MyWindow Extends WindowField image:ImageMethod New( title:String="Simple mojo app",width:Int=640,height:Int=480,flags:WindowFlags=Null )Super.New( title,width,height,flags )image = New Image(64,64)Local icanvas:Canvas = New Canvas(image)icanvas.Clear(New Color(0,0,0,0))icanvas.Color = New Color(1,0,0,1)icanvas.LineWidth = 4icanvas.DrawLine(0,0,63,0)icanvas.DrawLine(63,0,63,63)icanvas.DrawLine(63,63,0,63)icanvas.DrawLine(0,63,0,0)icanvas.Color = New Color(0,0,1,1)icanvas.DrawLine(0,0,63,63)icanvas.Color = New Color(0,1,0,1)icanvas.DrawLine(63,0,0,63)icanvas.Flush()EndMethod OnRender( canvas:Canvas ) OverrideApp.RequestRender()'x,y verts to drawLocal verts:=New Float[]( Width/2,0,Width,Height/2,Width/2,Height,0,Height/2 )'params:'4=draw quads (3=tris, 6=hexs etc, prims must be convex!)'1=draw 1 quad.'verts.Data=float ptr to vertex data.'8=pitch, ie: bytes between one vertex and the next, 2 floats=2*4=8.canvas.Color = New Color(1,1,1)canvas.DrawPrimitives( 4,1,verts.Data,8,Null,0,Null,0,image,null )canvas.DrawImage(image,0,0)EndEndFunction Main()New AppInstanceNew MyWindowApp.Run()EndThanks Mark. That helped a little. I am trying to plaster an image into a four sided poly or a quad.
Ups! I thought you had put the whole code!
But yea, I get the same results.Are you sure the last example works as is. I get an illegal use of Generic.. when I try to run it.
I had to declare the stack as <int> for it to run.and I do get the correct results:
Attachments:
That’s weird. I am getting 5 and 5 and I am using 1.1.0.3 which I dowloaded and compiled it from Github from develop section. The about monkey2 in the help says 1.1.02 but mx2cc says 1.1.03.
Thats on OSX.I don’t see the problem
this is what you are doing on the first one:
>Print(-5+10)
and the second:
>Print (10-5)
and I am getting
5
5
which is correct.Guess I didn’t look thoroughly enough. Thanks.
I still have to figure out how to use it. -
AuthorPosts
