Path: csiph.com!weretis.net!feeder6.news.weretis.net!feeder7.news.weretis.net!news.unit0.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Richard Ashbery Newsgroups: comp.sys.acorn.programmer Subject: Re: Rotating a Colour-Filled Square Date: Sun, 17 Nov 2019 13:50:14 +0000 (GMT) Organization: None Lines: 55 Message-ID: <58145cb23cbasura@invalid.addr.uk> References: <5811cae024basura@invalid.addr.uk> <58124834ffbasura@invalid.addr.uk> <58125f40fdbasura@invalid.addr.uk> <5812df5497basura@invalid.addr.uk> <5813d0c48ebasura@invalid.addr.uk> X-Trace: individual.net /rQ3N1EVtlv13U9EV7FT1Aw2nleAMXOio+Qh5nI/r0NUWtZibW X-Orig-Path: uwclub.net!richard.ashbery Cancel-Lock: sha1:QtK73E2Vw8Ac024lW/969s8+ZP8= User-Agent: Pluto/3.16 (RISC OS/5.25) NewsHound/v1.52-32 Xref: csiph.com comp.sys.acorn.programmer:5887 In article , Steve Fryatt wrote: > On 16 Nov, Richard Ashbery wrote in message > <5813d0c48ebasura@invalid.addr.uk>: > > In article , > > Steve Fryatt wrote: > > > > > The fact that PLOT exists, probably. You would also need > > > PARALLELOGRAM, ARC, SEGMENT and SECTOR, as well as DRAW > > > variants for "dotted", "no first" and "no last". The > > > "background" and "inverse" plot modes aren't supported by > > > dedicated keywords, either. > > > > > In the end, there was presumably a tradeoff between making > > > things easy to remember and 'wasting' keyword tokens on the > > > task -- there are only a finite number of these available, > > > after all. > > > > I would value a RECTANGLE FILL ROTATE command. > The thing is, having thought about it, you wouldn't actually do it > like that. > The ELLIPSE command is ELLIPSE [FILL] x%, y%, m%, n%[, a], so you > would ideally be consistent and do RECTANGLE [FILL] x%, y%, w%, > h%[, a]. Sadly that's slightly problematic, since the h% is already > optional on RECTANGLE. You could always state that a isn't valid > unless h% is present, though. > > Not too bothered about the other shapes. The rectangle/square is > > extremely versatile - a single line command to do this could save > > a lot of time. > What do you mean by "a lot of time"? Is that programmer time in > working out the calls to use, or actual program execution time? The > latter possibly, but if the former, then why not PROCrectange(x%, > y%, w%, h%, a)? The former - for simple soles like me ;-) 4 lines of code should do it... FOR rotate = 0 TO PI STEP PI/4 GCOL RND(10) RECTANGLE FILL 0,0,600,400,rotate NEXT rotate OK it can't be done but could it be implemented in some form? Only by substituting ELLIPSE for RECTANGLE will it work. [SNIP : Another excellent rotating rectangle example] Richard