Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I paint a shape?
#20
(06-28-2023, 05:20 AM)PhilOfPerth Wrote: Thanks Petr. No, I didn't necessarily want the exact same shape. I wanted a flexible algorithm that I could apply to different shapes to colour them

It's worth studying what Petr and Terry propose, because as I've said before, it could be a chore to find point inside a shape out of only DRAW commands. It would be difficult even to tell from one DRAW string or several strings if the shape is closed, or if it draws several shapes together which are closed and which one to fill in.

A few years ago I wrote a QB64 program that does "interactive" DRAW commands. The user types in the DRAW string as QBasic/QB64 expects in the text editor area at the bottom of the screen, and the program then tries to execute the resulting DRAW string. It has two modes: one which is the text editor mode that I described, and another which is "doodle" mode with the arrow keys and other keys (for color and scale) but which still creates DRAW commands. I have to go find it in my backups.

One might have to build such a program to design the DRAW string for a specific shape and to figure out which is a safe point to use before painting. Otherwise it could cause repeated requests to compile that wear down the disk drive... only for one little adjustment to the DRAW string. Yes I have done that many times before.
Reply


Messages In This Thread
How do I paint a shape? - by PhilOfPerth - 06-27-2023, 08:00 AM
RE: How do I paint a shape? - by mnrvovrfc - 06-27-2023, 10:54 AM
RE: How do I paint a shape? - by OldMoses - 06-27-2023, 11:22 AM
RE: How do I paint a shape? - by TerryRitchie - 06-27-2023, 11:56 AM
RE: How do I paint a shape? - by bplus - 06-27-2023, 12:26 PM
RE: How do I paint a shape? - by Petr - 06-27-2023, 02:05 PM
RE: How do I paint a shape? - by Petr - 06-27-2023, 02:19 PM
RE: How do I paint a shape? - by PhilOfPerth - 06-28-2023, 05:20 AM
RE: How do I paint a shape? - by mnrvovrfc - 06-28-2023, 07:13 PM
RE: How do I paint a shape? - by Petr - 06-27-2023, 02:39 PM
RE: How do I paint a shape? - by TempodiBasic - 06-28-2023, 12:19 AM
RE: How do I paint a shape? - by PhilOfPerth - 06-28-2023, 05:36 AM
RE: How do I paint a shape? - by bplus - 06-28-2023, 01:29 AM
RE: How do I paint a shape? - by mnrvovrfc - 06-28-2023, 02:08 AM
RE: How do I paint a shape? - by PhilOfPerth - 06-28-2023, 05:04 AM
RE: How do I paint a shape? - by bplus - 06-28-2023, 02:16 AM
RE: How do I paint a shape? - by mnrvovrfc - 06-28-2023, 02:50 AM
RE: How do I paint a shape? - by bplus - 06-28-2023, 03:03 AM
RE: How do I paint a shape? - by bplus - 06-28-2023, 02:30 AM
RE: How do I paint a shape? - by PhilOfPerth - 06-28-2023, 05:03 AM
RE: How do I paint a shape? - by TempodiBasic - 06-28-2023, 09:24 PM
RE: How do I paint a shape? - by TempodiBasic - 06-28-2023, 10:09 PM



Users browsing this thread: 2 Guest(s)