Canvas is cool! - page 8

 
Nikolai Semko:
That's what I thought. I was thinking about you the other day.
I thought: Peter must be working hard and the world will soon see something super-duper.
And I also thought: What if Pyotr has mastered OOP now and will give everyone a new GUI class. ))

Well, it's still a long way to the super-duper class. )) ) I would at least like to achieve absolute stability and completeness.

You just have to accept the fact that a stable state in the development process can only be temporary.

You have to stop developing in order to reach the ultimate end. At some point this will happen. The potential will be exhausted.

I hope it's still a long way off.)


Someday I'll teach you my approach and you'll teach me OOP. Then we'll be able to speak the same language and figure out what's cooler.))

 
Реter Konow:


P.S.S. How long have you been working on the solution? If it's not a secret.

About three hours. It worked the second time, a couple of minutes after the first compilation.
There is nothing complicated there. You draw two grids of square cells: one original, the other with a new scale. And everything becomes clear. The only formula you need is rectangular area )).

The scaling function itself is about 50 lines of code.

ReTeg Konow:

I see. You started with "pimping" the kanvas, and from that move on to the controls?

My gui will be mega lightweight. Literally 3-5 controls. I don't even need drop down lists.

 
Nikolai Semko:

for about three hours. It worked the second time, a couple of minutes after the first compilation.
So there's nothing complicated there. You draw two grids of square cells: one with the original and one with the new scale. And everything becomes clear. You only need one formula - the area of the rectangle.)

You have a more mathematical mind. I have an easier time visualizing projected mechanisms in my mind. Maybe that's because I do it more... Recently I've been working on the task of splitting a colour into a range of tones. As it is implemented in Windows colour palette, and suddenly realized that I've forgotten a lot of maths. Now you need corner rounding, shadow smoothing, bitmap scaling. Basically, what you're doing now.


My kanvas will be mega light. Literally 3-5 controls. I don't even need drop down lists.

And how will the GUI work without drop-down lists?

 
Nikolai Semko:

Back to work. We'll talk again.

Creative victories to you, Nikolai!

 
George Merts:

No, it's really impressive.

But, you have to make some kind of useful add-on that takes advantage of all those Canvas features.

So that your developments would not suffer the same fate as the CGA adapter - a wonderful graphic adapter, misunderstood and underestimated by its contemporaries.

I myself always considered CGA to be "lame as ever" beating eight bits Commodore 64 or Sinclair Spectrum. But recently it turned out that, simply because of lack of popularity - almost nobody used all the opportunities of this card. And there were almost no games that could compete with eight-bit home computers.

Had IBM promoted CGA, had this demo appeared in 1981, CGA would have been much more popular, and maybe EGA would have come out later:


When I look at that LOT of colors, I can't believe it's even possible with an old CGA adapter with its 16K video memory, connected to an ordinary TV set (RGB monitor is no good at all, that was the idea - better quality text on RGB monitor, but poor colour gamut, but lots of graphical possibilities with bad readable text on a TV set with a composite input).

There was nothing great about it, it sucked. I worked with it on the first computer in our firm. You could display graphs of measurements in its highest resolution only in black and white. I don't remember the resolution, but vertically it was 200 pixels. Horizontally, it seemed to be 800. Although my computer had 512 Kb RAM :)) God, how old I am)).

 
Реter Konow:

Someday I'll teach you my approach and you teach me OOP. Then we will be able to speak the same language and decide what's cooler).

Peter, you reinvent the interpreter and I love the compiler.

Konow tag:

And how will the GUI work without checklists?

Brilliant! ))

Well, maybe I will.

Retag Kon ow:

Back to work. We'll talk more.

Creative victories to you, Nikolai!

Thank you, Pyotr. Likewise!

 
Alexey Volchanskiy:

There was nothing great about it, it sucked. I worked with it on the first computer in our company. Measurement graphs could only be output at its highest resolution in black and white. I don't remember the resolution, but vertically it was 200 pixels. Horizontally, it seemed to be 800. Although my computer had 512 Kb RAM :)) God, I'm so old.)

Right. You too, Alexei!

Don't forget, it was 1981. You could only have 16Kb of memory on board. The same amount was in the adapter. And you'd pay $1500 for that !

And for "512 kb RAM" - you'll have to pay $3000!


640x200 with that kind of memory is a very high resolution - that was the best resolution available at the time (320x200 was standard and most of them were alphanumeric).

You, Leha, just had a shift in time... You measure the late 70's technology with a ruler, as I understand it, late 80's, if not even later.

If you wanted crisp graphs - 640x200x2 is pretty decent quality. Do you want colour graphics? CGA has them - 320x200x4, two fixed palette options.

For business it's good enough.

Want to play games? Get a regular TV (or composite monitor) - there you get 320x200x16 (but the colour for two adjacent dots was the same). Normal letters will start to "shimmer in colour", but for the toys, it's unimportant, there are either no letters, or they are sprites, large.

It doesn't suck, Leha. It's a very cool map.

 
Реter Konow:

:))

Well done, though! But I don't need the code, I want to get there myself.

P.S. And why "lost soul"? Do I deny the holy OOP? :))

P.S.S. How long have you been working on your solution? If it's not a secret.

Do you want to invent something better than what was invented long ago? https://en.wikipedia.org/wiki/Image_scaling#Algorithms

Image scaling - Wikipedia
Image scaling - Wikipedia
  • en.wikipedia.org
When scaling a vector graphic image, the graphic primitives that make up the image can be scaled using geometric transformations, with no loss of image quality. When scaling a raster graphics image, a new image with a higher or lower number of pixels must be generated. In the case of decreasing the pixel number (scaling down) this usually...
 
Реter Konow:

Good for you, though! But you don't need to post the code, I want to get there myself.

Oh, please.
I will make life easier.

I will give you the code as an example.

Of course, we could implement a faster algorithm. But that's the first thing that came to my mind.

Files:
TestScaling.ex5  514 kb
Scaling.ZIP  399 kb
 
Georgiy Merts:

That's right. You too, Alexei!

Don't forget, it was 1981! You could only have 16Kb of memory on board! The same amount was in the adapter. And you'd pay $1500 for that !

But for "512 Kb RAM" you'll have to pay $3000!


640x200 with that kind of memory is a very high resolution - that was the best resolution available at the time (320x200 was standard and most of them were alphanumeric).

You, Leha, just had a shift in time... You measure the late 70's technology with a ruler, as I understand it, late 80's, if not even later.

If you wanted crisp graphs - 640x200x2 is pretty decent quality. Do you want colour graphics? CGA has them - 320x200x4, two fixed palette options.

For business it's good enough.

Want to play games? Get a regular TV (or composite monitor) - there you get 320x200x16 (but the colour for two adjacent dots was the same). Normal letters will start to "shimmer in colour", but for the toys, it's unimportant, there are either no letters, or they are sprites, large.

It doesn't suck, Leha. It's a very cool map.

I remember those times very well, but I'm not nostalgic. And I remember the ISA bus, it was the last bus for which I made homemade measuring boards for equipment, which I painted with nail polish and etched with chlorine iron. I get nostalgic about my youth and girls, but not about the hardware of that time ))

And '81 was for the West, for me it was about '90. In '81 or a bit later I was taught at the good old Bonch-Bruevich to program on a Nairi computer, which was a domestic development of the early 60s, without a monitor, but with a typewriter which was used for the dialog. Not nostalgic either )).