/[mcclim]/mcclim/pixmap.lisp
ViewVC logotype

Contents of /mcclim/pixmap.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Fri Feb 23 12:47:23 2001 UTC (13 years, 1 month ago) by cvs
Branch: MAIN
pixmaps are now available. Add a new extensions : draw-glyph (see graphics.lisp). Did the make device-font-text-style.
1 ;;; -*- Mode: Lisp; Package: CLIM-INTERNALS -*-
2
3 ;;; (c) copyright 2001 by Iban HATCHONDO (hatchond@mei.u-bordeaux.fr)
4
5 ;;; This library is free software; you can redistribute it and/or
6 ;;; modify it under the terms of the GNU Library General Public
7 ;;; License as published by the Free Software Foundation; either
8 ;;; version 2 of the License, or (at your option) any later version.
9 ;;;
10 ;;; This library is distributed in the hope that it will be useful,
11 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ;;; Library General Public License for more details.
14 ;;;
15 ;;; You should have received a copy of the GNU Library General Public
16 ;;; License along with this library; if not, write to the
17 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 ;;; Boston, MA 02111-1307 USA.
19
20 (in-package :CLIM-INTERNALS)
21
22 (defclass pixmap ()
23 ((sheet :initarg :sheet :reader pixmap-sheet)
24 (width :initarg :width :reader pixmap-width)
25 (height :initarg :height :reader pixmap-height)
26 ))
27
28 (defgeneric pixmap-mirror (mirrored-pixmap))
29 (defgeneric allocate-pixmap (sheet width height))
30 (defgeneric deallocate-pixmap (pixmap))
31 (defgeneric copy-to-pixmap (sheet sheet-x sheet-y width height
32 &optional pixmap (pixmap-x 0) (pixmap-y 0)))
33 (defgeneric copy-from-pixmap (pixmap from-x from-y width height sheet to-x to-y))
34 (defgeneric copy-area (sheet from-x from-y width height to-x to-y))
35
36 (defclass mirrored-pixmap (pixmap)
37 ((port :initform nil :initarg :port :accessor port)
38 (medium :initform nil :accessor pixmap-medium)
39 (region :initform nil :accessor sheet-region)
40 ))
41
42 (defmethod initialize-instance :after ((pixmap mirrored-pixmap) &rest args)
43 (declare (ignore args))
44 (with-slots (width height region) pixmap
45 (setf region (make-bounding-rectangle 0 0 width height))))
46
47 (defmethod pixmap-mirror ((pixmap mirrored-pixmap))
48 (port-lookup-mirror (port pixmap) pixmap))
49
50 (defmethod allocate-pixmap ((sheet sheet) width height)
51 (port-allocate-pixmap (port sheet) sheet width height))
52
53 (defmethod deallocate-pixmap ((pixmap pixmap))
54 (port-deallocate-pixmap (port (pixmap-sheet pixmap)) pixmap))
55
56
57
58
59
60
61

  ViewVC Help
Powered by ViewVC 1.1.5