Canvas is cool! - page 15

 
Реter Konow:

Yes, it looks very good. Quality shapes of circles.

But, you are using CCanvas class, and there the coordinates are set in int.

I don't use CCanvas class for smoothed circles, but my own class with type double

 
Реter Konow:

And ResourseFree() ?

ResourceFree will only work for resources whose name you know. Furthermore, the resource can only be killed from the program that created it. As it is read-only for others.

 
Nikolai Semko:

I don't use a CCanvas class for smooth circles, but my own class with type double

And how will they move if you stop them changing in size?

 
fxsaber:

Well then for some reason it didn't work, as I had everything left.

I didn't work too zealously on the flame code. Abnormal situations arise. If it ended with an error, then it just didn't get to the destructor.

ZS I go into objects in that case. I press "all" and look for my bitmap and delete it. Only thing is, does it really delete the rusurus in that case?

 
fxsaber:

ResourceFree will only work for resources whose name you know. Furthermore, the resource can only be killed from the program that created it. As it is read-only for others.

So, the developer should provide for this issue. Give the user the possibility to destroy the resource by setting one of the properties of the object that carries this resource. For example, the script checks

ObjectGetInteger(0,"MT object",OBJPROP_SELECTED);

and when the user sets the object property

ObjectSetInteger(0,"MT object",OBJPROP_SELECTED,1);

The script destroys the resource and erases its object.

 
Реter Konow:

How will they move if you stop resizing them?

When you run the script, set the last two parameters to the same value (max size = min size) and the circles will not change size, but will only move smoothly, because they have a double coordinate.

 
Nikolai Semko:

Set the last two parameters to the same value (max size = min size) and the circles will not change size, but will only move smoothly because they have double coordinates.

Yes, they move more smoothly than circles based on int coordinates. But perhaps this is because the circle itself is smoother. In other words, less jerking is noticeable.

 
Dmitry Fedoseev:

There are plenty of 3D libraries written in JavaScript for a hundred years now. The easiest and most direct way is to rewrite them from there to here.

Not for 100 years, of course, but a few.

Tried it - it didn't work. All in unreadable form as a continuous single line. It's hard to make heads or tails of it. It's easier to do it yourself.

 
Реter Konow:

Yes, they move more smoothly than circles based on int coordinates. But perhaps that's because the circle itself is smoother. In other words, there is less noticeable twitching.

Peter. You are talking nonsense. I know what I'm talking about, as I'm a 100% creator of these circle algorithms. Trust your eyes, not your nerdy mentality.

Here's the specification for this circle:

void   iCanvas::iCircle(double  x,double  y,double  r,uint clr=255)
 
Nikolai Semko:

Peter. You're talking nonsense. I know what I'm talking about, as I'm 100% the creator of these circle algorithms myself. Trust your eyes, not your nerdy mentality.

All right. (chuckles) If you say so.