[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Graphics clipping question
Date: Fri, 03 Mar 89 11:27:34 -0500
From: kanderso@DINO.BBN.COM
Date: Thu, 2 Mar 89 16:46 PST
From: William M. York <York@Chuck-Jones.ILA-West.Dialnet.Symbolics.COM>
Subject: Graphics clipping question
To: kanderso@DINO.BBN.COM, slug@Warbucks.AI.SRI.COM
In-Reply-To: The message of 2 Mar 89 11:24 PST from kanderso@DINO.BBN.COM
Message-ID: <19890303004631.2.YORK@Chuck-Jones.ILA-West.Dialnet.Symbolics.COM>
Date: Thu, 02 Mar 89 14:24:35 -0500
From: kanderso@DINO.BBN.COM
I am trying to convert some graph drawing software to use GRAPHICS:
functions rather than window operations, and one thing i'm having
trouble with is clipping. I need to be able to clip drawing
operations to the rectangular outline of the graph. My old software
modified the TV:CLIPPING-REGION instance variable of the stream being
drawn on, and that worked fine. This doesn't work with GRAPHICS:
functions because the stream you think you are drawing on often has
nothing to do with the steam you are actually drawing on because you
are in a maze of twistly little continuations all alike.
Try:
(graphics:with-room-for-graphics ()
(graphics:with-clipping-path (t #'(lambda (s)
(graphics:draw-rectangle 100 100 200 200 :stream s :filled nil)))
(graphics:draw-circle 100 100 50)))
You can construct an arbitrary clipping region by drawing a path that
surrounds it.
I tried this too, but it has the same problem. It seems like i'll
have to do most of the clipping myself.
Please send a real bug report if it does not work. All clipping
examples I have tried work properly.