Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Apple Event + drawing?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  22 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
sungwoo  
View profile  
 More options Oct 24 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: sung...@cad.strath.ac.uk
Date: 2000/10/24
Subject: Apple Event + drawing?
Hello,
I am trying to draw a free line on a window.
Following codes are obviously doesn't work.

-------------------------------
(require 'quickdraw)

(defparameter *w* (make-instance 'window
                    :window-title "SketchPad"
                    :view-nick-name 'sketchpad
                    :view-size #@(400 300)))

(defun get-mouse-position(x y)  (setf (x y)  <--------------- this is bad.
How can I get the  (%get-ptr (view-mouse-position *w*))))            current
coordinates             of mouse position? (defun sketching ()
(with-focused-view *w*  (get-mouse-position x y)  (when #$mouseDown
<--------------  here problem as well....  (loop        is this correct
way to call a mouse  (require-trap #_lineto x y)                event?
(get-mouse-position next-x next-y)  (setf x next-x)  (setf y next-y)  (if
#$mouseUp (return))))  nil)) --------------------------- Would you give me
some correction please? Thanks,

Sungwoo

Sent via Deja.com http://www.deja.com/
Before you buy.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Oops!! sorry about the format..." by sung...@cad.strath.ac.uk
sungwoo  
View profile  
 More options Oct 24 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: sung...@cad.strath.ac.uk
Date: 2000/10/24
Subject: Oops!! sorry about the format...
Sorry about the format. I am trying to draw a free line on window, and
following code doesn't work. My question is (1) how can I get the current
coordinates of mouse position? (2) is this right way to call mouse event?
(sure.. it is not... cos it doesn't work..)  how can I call the event..?

Thanks,

Sungwoo
-----------------
;;
;;    SketchPad
;;

(require 'quickdraw)

(defparameter *w* (make-instance 'window
                    :window-title "SketchPad"
                    :view-nick-name 'sketchpad
                    :view-size #@(400 300)))

;;
;;  (if pencil-radio-button (pen-show *w*) (pen-hide *w*))
;;

(defun get-mouse-position(x y)
  (setf (x y)
        (%get-ptr (view-mouse-position *w*))))

(defun sketching ()
  (with-focused-view *w*
    (get-mouse-position x y)
    (when #$mouseDown
      (loop
        (require-trap #_lineto x y)
        (get-mouse-position next-x next-y)
        (setf x next-x)
        (setf y next-y)
        (if #$mouseUp (return))))
    nil))

Sent via Deja.com http://www.deja.com/
Before you buy.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Apple Event + drawing?" by Rainer Joswig
Rainer Joswig  
View profile  
 More options Oct 24 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Rainer Joswig <jos...@corporate-world.lisp.de>
Date: 2000/10/24
Subject: Re: Apple Event + drawing?
In article <8t4fe9$dq...@nnrp1.deja.com>, sung...@cad.strath.ac.uk
wrote:

AppleEvents are something different. A method for Interprocess
communication.

Above text is totally distorted.

I really think reading the MCL manual (yes, sometimes I read manuals),
reading a bit about Quickdraw and looking at the example code
in the examples directory might help.

Anyway, here is a simple example:

(require 'quickdraw)

; A simple drawing object:
(defclass simple-drawing-item (dialog-item) ())

; our own click handling routine for this item class
(defmethod dialog-item-action ((view simple-drawing-item))
  (let ((where (view-mouse-position view))
        position)
    (flet ((draw-a-line (from to)
             (move-to view from)
             (line-to view to)))
      (with-pen-saved
        (set-pen-mode view :patxor)
        (loop while (mouse-down-p)
              for last-position = nil then position
              do (setf position (view-mouse-position view))
              do (unless (eql last-position position)
                   (if last-position
                     (progn
                       (draw-a-line where last-position)
                       (draw-a-line where position))
                     (draw-a-line where position)))))
      (when position
        (draw-a-line where position)))))

(defparameter *w1*
  (make-instance 'window
    :window-title "SketchPad"
    :view-nick-name 'sketchpad
    :view-size #@(400 300)
    :color-p t
    :view-subviews (list
                    (make-instance 'simple-drawing-item
                      :view-size #@(400 300)))))

--
Rainer Joswig, Hamburg, Germany
Email: mailto:jos...@corporate-world.lisp.de
Web: http://corporate-world.lisp.de/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Now I got perfect freehand drawing function ^^" by sung...@cad.strath.ac.uk
sungwoo  
View profile  
 More options Oct 24 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: sung...@cad.strath.ac.uk
Date: 2000/10/24
Subject: Now I got perfect freehand drawing function ^^
Thanks for your help. =)
I changed something to work for real freehand drawing.
(and it works! ^^)
Please take a look follow codes, and give me any comment if you have.
Thanks again. =)
Sungwoo

--------------------------------------
(require 'quickdraw)

  (defclass simple-drawing-item (dialog-item) ())

  (defmethod dialog-item-action ((view simple-drawing-item))
    (let ((where (view-mouse-position view))
          position)
      (flet ((draw-a-line (from to)
              (move-to view from)
              (line-to view to))
             (add-a-line (to)
               (line-to view to)))
        (with-pen-saved
          (set-pen-mode view :patOr)
          (loop while (mouse-down-p)
                for last-position = nil then position
                do (setf position (view-mouse-position view))
                do (unless (eql last-position position)
                    (if last-position
                      (progn
                        (add-a-line last-position)
                        (add-a-line position))
                      (draw-a-line where position))))))))

  (defparameter *w1*
    (make-instance 'window
      :window-title "SketchPad"
      :view-nick-name 'sketchpad
      :view-size #@(400 300)
      :color-p t
      :view-subviews (list
                      (make-instance 'simple-drawing-item
                        :view-size #@(400 300)))))

Sent via Deja.com http://www.deja.com/
Before you buy.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rainer Joswig  
View profile  
 More options Oct 24 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Rainer Joswig <jos...@corporate-world.lisp.de>
Date: 2000/10/24
Subject: Re: Now I got perfect freehand drawing function ^^
In article <8t4s5v$pi...@nnrp1.deja.com>, sung...@cad.strath.ac.uk
wrote:

This should do the same:

(defmethod dialog-item-action ((view simple-drawing-item))
  (move-to view (view-mouse-position view))
  (with-pen-saved
    (set-pen-mode view :patOr)
    (loop while (mouse-down-p)
          do (line-to view (view-mouse-position view)))))

>   (defparameter *w1*
>     (make-instance 'window
>       :window-title "SketchPad"
>       :view-nick-name 'sketchpad
>       :view-size #@(400 300)
>       :color-p t
>       :view-subviews (list
>                       (make-instance 'simple-drawing-item
>                         :view-size #@(400 300)))))

> Sent via Deja.com http://www.deja.com/
> Before you buy.

--
Rainer Joswig, Hamburg, Germany
Email: mailto:jos...@corporate-world.lisp.de
Web: http://corporate-world.lisp.de/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Wow~!" by sung...@cad.strath.ac.uk
sungwoo  
View profile  
 More options Oct 24 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: sung...@cad.strath.ac.uk
Date: 2000/10/24
Subject: Wow~!

Wow~!! this code is much optimised... =)
Thanks!!

Sungwoo

Sent via Deja.com http://www.deja.com/
Before you buy.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Now I got perfect freehand drawing function ^^" by Erik Naggum
Erik Naggum  
View profile  
 More options Oct 24 2000, 8:22 pm
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.net>
Date: 25 Oct 2000 00:22:09 +0000
Local: Tues, Oct 24 2000 8:22 pm
Subject: Re: Now I got perfect freehand drawing function ^^
* sung...@cad.strath.ac.uk
|       :view-size #@(400 300)

  What does this #@ reader macro expand to?

#:Erik
--
  I agree with everything you say, but I would
  attack to death your right to say it.
                                -- Tom Stoppard


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Oops!! sorry about the format..." by Keke Abe
Keke Abe  
View profile  
 More options Oct 24 2000, 10:41 pm
Newsgroups: comp.lang.lisp
From: k...@mac.com (Keke Abe)
Date: Wed, 25 Oct 2000 02:41:01 GMT
Local: Tues, Oct 24 2000 10:41 pm
Subject: Re: Oops!! sorry about the format...

In article <8t4fs8$ea...@nnrp1.deja.com>, sung...@cad.strath.ac.uk wrote:
> I am trying to draw a free line on window, and
> following code doesn't work. My question is (1) how can I get the current
> coordinates of mouse position? (2) is this right way to call mouse event?
> (sure.. it is not... cos it doesn't work..)  how can I call the event..?

#1 Use VIEW-MOUSE-POSITION

#2 You don't want to call the mouse event by yourself. Instead, you handle
   the event signaled by MCL.

> (defun get-mouse-position(x y)
>   (setf (x y)
>         (%get-ptr (view-mouse-position *w*))))

This doesn't look like Lisp.

> (defun sketching ()
>   (with-focused-view *w*
>     (get-mouse-position x y)
>     (when #$mouseDown
>       (loop
>         (require-trap #_lineto x y)
>         (get-mouse-position next-x next-y)
>         (setf x next-x)
>         (setf y next-y)
>         (if #$mouseUp (return))))
>     nil))

* X, Y, NEXT-X and NEXT-Y are all 'undeclared free variables'.
* #$mouseDown and #$mouseUp are constants.
* REQUIRE-TRAP is not necessary.

 (defclass my-win (window) ())

 (defmethod view-click-event-handler ((win my-win) where)
   (with-focused-view win
     (#_moveto (point-h where) (point-v where))
     (loop while (mouse-down-p)
           do
           (let ((pos (view-mouse-position win)))
             (#_lineto (point-h pos) (point-v pos))))))

#|
(make-instance 'my-win)
|#

regards,
abe


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sungwoo  
View profile  
 More options Oct 25 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: sung...@cad.strath.ac.uk
Date: 2000/10/25
Subject: Re: Oops!! sorry about the format...
Thanks thanks, =)
It is very clear to me.

Sungwoo

In article <keke-2510001140520...@solg4.keke.org>,
  k...@mac.com (Keke Abe) wrote:

Sent via Deja.com http://www.deja.com/
Before you buy.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Now I got perfect freehand drawing function ^^" by sung...@cad.strath.ac.uk
sungwoo  
View profile  
 More options Oct 25 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: sung...@cad.strath.ac.uk
Date: 2000/10/25
Subject: Re: Now I got perfect freehand drawing function ^^

> |       :view-size #@(400 300)

>   What does this #@ reader macro expand to?

According to MCL Reference, the reader macro #@ converts the subsequent list
of two integers into a point. This can be used for clarity in source code.
For example, #@(30 -100) expands into -6553570, an integer that represents
the point with a horizontal coordinate of 30 and a vertical coordinate of
–100. The integer that encodes the x and y coordinates of a point is
automatically converted to a bignum if a fixnum cannot accommodate it. (For
definitions of bignum and fixnum, see Common Lisp: The Language.)

Sungwoo

Sent via Deja.com http://www.deja.com/
Before you buy.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Apple Event + drawing?" by sung...@cad.strath.ac.uk
sungwoo  
View profile  
 More options Oct 25 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: sung...@cad.strath.ac.uk
Date: 2000/10/25
Subject: Re: Apple Event + drawing?
Based on a couple of feedbacks, I changed the code as below
because I want get the local coordinates of each stroke and
sub-view as well. Is this well optimised or something more can be done?
Thanks,

Sungwoo
---------------------------------------------------------------------------
(defclass simple-drawing-item (dialog-item) ())

(defmethod dialog-item-action ((view simple-drawing-item))
  (let ((where (view-mouse-position view)))
    (#_moveto (point-h where) (point-v where))
    (with-pen-saved
      (set-pen-mode view :patOr)
      (loop while (mouse-down-p)
            do
            (let ((pos (view-mouse-position view)))
              (#_lineto (point-h pos) (point-v pos)))))))

  (defparameter *w1*
    (make-instance 'window
      :window-title "SketchPad"
      :view-nick-name 'sketchpad
      :view-size #@(400 300)
      :color-p t
      :view-subviews (list
                      (make-instance 'simple-drawing-item
                        :view-size #@(400 300)))))

Sent via Deja.com http://www.deja.com/
Before you buy.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Now I got perfect freehand drawing function ^^" by Erik Naggum
Erik Naggum  
View profile  
 More options Oct 25 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.net>
Date: 2000/10/25
Subject: Re: Now I got perfect freehand drawing function ^^
* sung...@cad.strath.ac.uk
| According to MCL Reference, the reader macro #@ converts the
| subsequent list of two integers into a point.

  That's nice, but what does it expand to?  That is, does the reader
  macro function actually return just an integer, or does whatever it
  returns _evaluate_ to an integer?  Is there a @ reader macro, too?

  (If you think you have to talk about bignums and fixnums, you're
  missing an important point about Lisp's integer concept.)

#:Erik
--
  I agree with everything you say, but I would
  attack to death your right to say it.
                                -- Tom Stoppard


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sungwoo  
View profile  
 More options Oct 25 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: sung...@cad.strath.ac.uk
Date: 2000/10/25
Subject: Re: Now I got perfect freehand drawing function ^^
In article <3181474687540...@naggum.net>,
  Erik Naggum <e...@naggum.net> wrote:

The reader macro in this case expand the coordinates of pointer, because
points are always returned as a single encoded integer. In this case, the
macro returns actual integer only (I maybe wrong).

I didn't mean that bignums and fixnums are important, I just copied text for
your information. =) Definately, I miss a lot of point of Lisp cos I am a
just newbie of Common Lisp. =) Sungwoo

Sent via Deja.com http://www.deja.com/
Before you buy.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Keke Abe  
View profile  
 More options Oct 25 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: k...@mac.com (Keke Abe)
Date: 2000/10/25
Subject: Re: Now I got perfect freehand drawing function ^^
In article <8t714n$h0...@nnrp1.deja.com>,

sung...@cad.strath.ac.uk wrote:
> > | According to MCL Reference, the reader macro #@ converts the
> > | subsequent list of two integers into a point.

> >   That's nice, but what does it expand to?  That is, does the reader
> >   macro function actually return just an integer, or does whatever it
> >   returns _evaluate_ to an integer?  Is there a @ reader macro, too?

> The reader macro in this case expand the coordinates of pointer, because
> points are always returned as a single encoded integer. In this case, the
> macro returns actual integer only (I maybe wrong).

If both h and v can be fit into 16bit signed integer, the macro
function returns an integer. Otherwise #@(h v) expands into
'(ccl::make-big-point h v) whicl, in turn, evaluates to cons (h . v).
The former is handy because MacOS toolbox uses the same format for
points.

regards,
abe


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Oct 25 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.net>
Date: 2000/10/25
Subject: Re: Now I got perfect freehand drawing function ^^
* sung...@cad.strath.ac.uk
| The reader macro in this case expand the coordinates of pointer,
| because points are always returned as a single encoded integer. In
| this case, the macro returns actual integer only (I maybe wrong).

  OK, could you please type (read-from-string "#@(400 300)") into a
  listener and post the result?

#:Erik
--
  I agree with everything you say, but I would
  attack to death your right to say it.
                                -- Tom Stoppard


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sungwoo  
View profile  
 More options Oct 25 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: sung...@cad.strath.ac.uk
Date: 2000/10/25
Subject: Re: Now I got perfect freehand drawing function ^^
In article <3181487131446...@naggum.net>,
  Erik Naggum <e...@naggum.net> wrote:

> * sung...@cad.strath.ac.uk
> | The reader macro in this case expand the coordinates of pointer,
> | because points are always returned as a single encoded integer. In
> | this case, the macro returns actual integer only (I maybe wrong).

>   OK, could you please type (read-from-string "#@(400 300)") into a
>   listener and post the result?

> #:Erik
> --
>   I agree with everything you say, but I would
>   attack to death your right to say it.
>                            -- Tom Stoppard

Here is the result. ----------------------------- ? (read-from-string "#@(400
300)") 19661200 11 ----------------------------- Hmm.. it excute something..
What does excuted from that integer? Ok, I was wrong (as you expected). I
took a look the combination of 'shapesign' from Hyperspec 4.0 manual, but
couldn't find #@. Strange.... Dispatch @ is undefined... so how does this
works?

Sungwoo

Sent via Deja.com http://www.deja.com/
Before you buy.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas A. Russ  
View profile  
 More options Oct 25 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: t...@sevak.isi.edu (Thomas A. Russ)
Date: 2000/10/25
Subject: Re: Now I got perfect freehand drawing function ^^

sung...@cad.strath.ac.uk writes:
> I took a look the combination of 'shapesign' from Hyperspec 4.0 manual, but
> couldn't find #@. Strange.... Dispatch @ is undefined... so how does this
> works?

It is an MCL extension to Common Lisp, so you won't find it in the
HyperSpec.  It will be in the MCL specific documentation.

--
Thomas A. Russ,  USC/Information Sciences Institute          t...@isi.edu    


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob Warnock  
View profile  
 More options Oct 29 2000, 1:21 pm
Newsgroups: comp.lang.lisp
From: r...@rigden.engr.sgi.com (Rob Warnock)
Date: 28 Oct 2000 10:05:12 GMT
Local: Sat, Oct 28 2000 6:05 am
Subject: Re: Now I got perfect freehand drawing function ^^
<sung...@cad.strath.ac.uk> wrote:

+---------------
|   Erik Naggum <e...@naggum.net> wrote:
| >   OK, could you please type (read-from-string "#@(400 300)") into a
| >   listener and post the result?
|
| Here is the result. ? (read-from-string "#@(400 300)") 19661200 11
| Hmm.. it excute something..
+---------------

I don't know what the second result value "11" is,
but the first one is:

        > (+ 400 (* 65536 300))
        19661200
        >

which is consistent with what someone else said about
small "points" having 16-bit components...

-Rob

-----
Rob Warnock, 31-2-510           r...@sgi.com
Network Engineering             http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.          Phone: 650-933-1673
1600 Amphitheatre Pkwy.         PP-ASEL-IA
Mountain View, CA  94043


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike McDonald  
View profile  
 More options Oct 29 2000, 6:51 pm
Newsgroups: comp.lang.lisp
From: mike...@mikemac.com (Mike McDonald)
Date: Sun, 29 Oct 2000 23:51:34 GMT
Local: Sun, Oct 29 2000 6:51 pm
Subject: Re: Now I got perfect freehand drawing function ^^
In article <8te8co$3n0t...@fido.engr.sgi.com>,
        r...@rigden.engr.sgi.com (Rob Warnock) writes:

> <sung...@cad.strath.ac.uk> wrote:
> +---------------
>|   Erik Naggum <e...@naggum.net> wrote:
>| >   OK, could you please type (read-from-string "#@(400 300)") into a
>| >   listener and post the result?
>|
>| Here is the result. ? (read-from-string "#@(400 300)") 19661200 11
>| Hmm.. it excute something..
> +---------------

> I don't know what the second result value "11" is,

  Isn't the "11" the number of characters read?

  Mike McDonald
  mike...@mikemac.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob Warnock  
View profile  
 More options Oct 29 2000, 10:36 pm
Newsgroups: comp.lang.lisp
From: r...@rigden.engr.sgi.com (Rob Warnock)
Date: 30 Oct 2000 03:36:27 GMT
Local: Sun, Oct 29 2000 10:36 pm
Subject: Re: Now I got perfect freehand drawing function ^^
Mike McDonald <mike...@mikemac.com> wrote:

+---------------
| r...@rigden.engr.sgi.com (Rob Warnock) writes:
| > <sung...@cad.strath.ac.uk> wrote:

| > +---------------
| >| Here is the result. ? (read-from-string "#@(400 300)") 19661200 11
| >| Hmm.. it excute something..
| > +---------------
| >
| > I don't know what the second result value "11" is,
|
|   Isn't the "11" the number of characters read?
+---------------

Doh! Of course! I was so fixated on the "#@" I didn't think about
the definition of "read-from-string". (Oops!)

-Rob

-----
Rob Warnock, 31-2-510           r...@sgi.com
Network Engineering             http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.          Phone: 650-933-1673
1600 Amphitheatre Pkwy.         PP-ASEL-IA
Mountain View, CA  94043


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kent M Pitman  
View profile  
 More options Oct 30 2000, 2:12 am
Newsgroups: comp.lang.lisp
From: Kent M Pitman <pit...@world.std.com>
Date: Mon, 30 Oct 2000 07:10:38 GMT
Local: Mon, Oct 30 2000 2:10 am
Subject: Re: Now I got perfect freehand drawing function ^^

It's the ending position in the string (the position of the first char
not read) ... which in the case of a non-zero :start will be different
than the number of characters read.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Oct 30 2000, 8:22 am
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.net>
Date: 30 Oct 2000 12:38:39 +0000
Local: Mon, Oct 30 2000 7:38 am
Subject: Re: Now I got perfect freehand drawing function ^^
* Rob Warnock
| I don't know what the second result value "11" is,
| but the first one is:
|
|       > (+ 400 (* 65536 300))
|       19661200
|       >
|
| which is consistent with what someone else said about
| small "points" having 16-bit components...

  Thanks.  Allow me a stylistic comment to this addition and
  multiplication approach.  If we have 16-bit fields, I would much
  prefer something like this:

(dpb 300 (byte 16 16) 400)

  But maybe that's the old PDP-10 heritage rearing its elegant head.

#:Erik
--
  Does anyone remember where I parked Air Force One?
                                   -- George W. Bush


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »