\r
ifeq ($(vomp_platform),raspberry)\r
$(info Raspberry pi flags)\r
-LDFLAGS = -Wall\r
-LIBS = -L/opt/vc/lib -lpthread -lrt -lEGL -lGLESv2 -lopenmaxil -lbcm_host -lavformat -lavcodec -lavutil\r
+LDFLAGS = -Wall -Wl,--format=binary -Wl,fonts/sourcesans.ttf -Wl,other/vdrhires.jpg -Wl,other/wallpaper720p.jpg -Wl,--format=default \r
+LIBS = -L/opt/vc/lib -lpthread -lrt -lEGL -lOpenVG -lopenmaxil -lbcm_host -lavformat -lavcodec -lavutil\r
\r
-OBJECTS += main.o threadp.o osdopengl.o surfaceopengl.o ledraspberry.o mtdraspberry.o videoomx.o audioomx.o wjpegsimple.o remotelinux.o glshader.o glosdshader.o \r
-LIBS+= -ljpeg\r
+OBJECTS += main.o threadp.o osdvector.o surfacevector.o osdopenvg.o ledraspberry.o mtdraspberry.o videoomx.o audioomx.o wjpegsimple.o remotelinux.o \r
+LIBS+= -lfreetype -lMagick++ -lMagickCore\r
CROSSLIBS = \r
-INCLUDES = -DVOMP_PLATTFORM_RASPBERRY -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads \r
+INCLUDES = -DVOMP_PLATTFORM_RASPBERRY -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/usr/include/freetype2 -I/usr/include/ImageMagick\r
CXXFLAGS_DEV += -D__STDC_CONSTANT_MACROS\r
CXXFLAGS_REL += -D__STDC_CONSTANT_MACROS\r
\r
char line[256];\r
int lineHeight = getFontHeight() + paraVSpace;\r
\r
- int lineWidth;\r
- int thisCharWidth;\r
+ float lineWidth;\r
+ float thisCharWidth;\r
int textPos;\r
int linePos;\r
int ypos;\r
while(1)\r
{\r
printLine = 0;\r
+ unsigned int cur_length=1;\r
+ wchar_t cur_char=getWChar(text+textPos,&cur_length);\r
\r
- if (text[textPos] == '\0') break;\r
+ if (cur_char == '\0') break;\r
\r
- if (text[textPos] == '\n')\r
+ if (cur_char == '\n')\r
{\r
- textPos++; // ignore the \n\r
+ textPos+=cur_length; // ignore the \n\r
printLine = 1;\r
break;\r
}\r
-\r
- thisCharWidth = charWidth(text[textPos]);\r
+ thisCharWidth = charWidth(cur_char);\r
if ((lineWidth + thisCharWidth) > (int)(area.w - (2 * paraMargin)))\r
{\r
// this character would break the right margin\r
- if (text[textPos] == ' ')\r
+ if (cur_char == ' ')\r
{\r
// this char is a space, ignore and break\r
- textPos++;\r
+ textPos+=cur_length;\r
break;\r
}\r
else\r
{\r
// Need to go back to the last space in the line\r
- while ((text[textPos] != ' ') && (linePos >= 0))\r
+ while ((cur_char != ' ') && (linePos >= 0))\r
{\r
- textPos--;\r
+ textPos-=cur_length;\r
+ cur_char=getWChar(text+textPos,&cur_length);\r
linePos--;\r
}\r
// Now take the space we just found\r
- textPos++;\r
+ textPos+=cur_length;\r
break;\r
}\r
}\r
- line[linePos++] = text[textPos];\r
+ for (int n=0;n<cur_length;n++) line[linePos++] = text[textPos+n];\r
lineWidth += thisCharWidth;\r
- textPos++;\r
+ textPos+=cur_length;\r
}\r
\r
// line[linePos++] = '\0';\r
}\r
\r
\r
-int Boxx::charWidth(char c)\r
+float Boxx::charWidth(wchar_t c)\r
{\r
if (parent) return parent->charWidth(c);\r
else if (surface) return surface->getCharWidth(c);\r
- else return 10; //?\r
+ else return 16.; //?\r
+}\r
+\r
+wchar_t Boxx::getWChar(const char* str, unsigned int *length)\r
+{\r
+ if (parent) return parent->getWChar(str,length);\r
+ else if (surface) return surface->getWChar(str,length);\r
+ else return '?'; //?\r
}\r
\r
Surface * Boxx::getSurface() {\r
void startFastDraw();\r
void endFastDraw();\r
\r
- int charWidth(char c);\r
+ float charWidth(wchar_t c);\r
+ wchar_t getWChar(const char* str, unsigned int *length);\r
\r
void add(Boxx*); // a boxx has a set of child boxxs\r
void remove(Boxx*);\r
//lirc?\r
#define Mtd_TYPE MtdRaspberry //this is device dependent\r
#define Led_TYPE LedRaspberry //this is device dependent\r
- #define Osd_TYPE OsdOpenGL // This OpenGL ES 2.0, in the moment only for raspberry, but might be splitted for other devices\r
+ #define Osd_TYPE OsdOpenVG // This OpenGL ES 2.0, in the moment only for raspberry, but might be splitted for other devices\r
#define OsdStartDev ""\r
#define Audio_TYPE AudioOMX // This is Audio based on OpenMax and libav for decoding\r
#define Video_TYPE VideoOMX // This is Video based on OpenMax\r
+++ /dev/null
-The fonts were obtained from the debian package xfree86.
-The copyright file from this package is included here.
-
-
-Package: xfree86
-Obtained from: XFree86 CVS repository (anoncvs@anoncvs.xfree86.org:/cvs)
-Upstream author(s): The XFree86 Project, Inc., et al.
-Debian package author(s): Stephen Early, Mark Eichin, Branden Robinson
-
-Debian modifications to upstream sources:
-
- The following files were removed from the source package due to
- non-DFSG-compliant licensing:
- xc/fonts/scaled/Type1/COPYRIGHT.BH
- xc/fonts/scaled/Type1/COPYRIGHT.IBM
- xc/fonts/scaled/Type1/UTBI____.afm
- xc/fonts/scaled/Type1/UTBI____.pfa
- xc/fonts/scaled/Type1/UTB_____.afm
- xc/fonts/scaled/Type1/UTB_____.pfa
- xc/fonts/scaled/Type1/UTI_____.afm
- xc/fonts/scaled/Type1/UTI_____.pfa
- xc/fonts/scaled/Type1/UTRG____.afm
- xc/fonts/scaled/Type1/UTRG____.pfa
- xc/fonts/scaled/Type1/cour.afm
- xc/fonts/scaled/Type1/cour.pfa
- xc/fonts/scaled/Type1/courb.afm
- xc/fonts/scaled/Type1/courb.pfa
- xc/fonts/scaled/Type1/courbi.afm
- xc/fonts/scaled/Type1/courbi.pfa
- xc/fonts/scaled/Type1/couri.afm
- xc/fonts/scaled/Type1/couri.pfa
- xc/fonts/scaled/Type1/lcdxmo.afm
- xc/fonts/scaled/Type1/lcdxmo.pfa
- xc/fonts/scaled/Type1/lcdxmr.afm
- xc/fonts/scaled/Type1/lcdxmr.pfa
- xc/fonts/scaled/Type1/lcdxro.afm
- xc/fonts/scaled/Type1/lcdxro.pfa
- xc/fonts/scaled/Type1/lcdxrr.afm
- xc/fonts/scaled/Type1/lcdxrr.pfa
- xc/fonts/scaled/Type1/lcdxso.afm
- xc/fonts/scaled/Type1/lcdxso.pfa
- xc/fonts/scaled/Type1/lcdxsr.afm
- xc/fonts/scaled/Type1/lcdxsr.pfa
-
- See the debian/patches directory for all other changes to upstream
- source.
-
-Debian copyright(s)/license(s):
-
-Unless otherwise noted, all modifications and additions to XFree86 found in
-this Debian package bear the following copyright and license terms:
-
-Copyright 1996-2001 Software in the Public Interest, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-SOFTWARE IN THE PUBLIC INTEREST, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of Software in the Public
-Interest, Inc. shall not be used in advertising or otherwise to promote the
-sale, use or other dealings in this Software without prior written
-authorization from Software in the Public Interest, Inc.
-
-Upstream copyright(s)/license(s):
-
-********************************************************************************
-
-1. XFree86 License
-
-XFree86 code without an explicit copyright is covered by the following copy-
-right/license:
-
-Copyright (C) 1994-2001 The XFree86 Project, Inc. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is fur-
-nished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
-NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
-NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the XFree86 Project shall not
-be used in advertising or otherwise to promote the sale, use or other deal-
-ings in this Software without prior written authorization from the XFree86
-Project.
-
-2. Other Licenses
-
-Portions of code are covered by the following licenses/copyrights:
-
-2.1 X Consortium
-
-Copyright (C) 1996 X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is fur-
-nished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
-NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X
-CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from the X Consortium.
-
-X Window System is a trademark of X Consortium, Inc.
-
-2.2 Berkeley-based copyrights:
-
-2.2.1 General
-
-Redistribution and use in source and binary forms, with or without modifica-
-tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
-CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
-CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
-ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-2.2.2 UCB/LBL
-
-Copyright (c) 1993 The Regents of the University of California. All rights
-reserved.
-
-This software was developed by the Computer Systems Engineering group at
-Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and contributed to
-Berkeley.
-
-All advertising materials mentioning features or use of this software must
-display the following acknowledgement: This product includes software devel-
-oped by the University of California, Lawrence Berkeley Laboratory.
-
-Redistribution and use in source and binary forms, with or without modifica-
-tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. All advertising materials mentioning features or use of this software
- must display the following acknowledgement: This product includes soft-
- ware developed by the University of California, Berkeley and its con-
- tributors.
-
- 4. Neither the name of the University nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DIS-
-CLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-2.3 NVIDIA Corp
-
-Copyright (c) 1996 NVIDIA, Corp. All rights reserved.
-
-NOTICE TO USER: The source code is copyrighted under U.S. and international
-laws. NVIDIA, Corp. of Sunnyvale, California owns the copyright and as
-design patents pending on the design and interface of the NV chips. Users
-and possessors of this source code are hereby granted a nonexclusive, roy-
-alty-free copyright and design patent license to use this code in individual
-and commercial software.
-
-Any use of this source code must include, in the user documentation and
-internal comments to the code, notices to the end user as follows:
-
-Copyright (c) 1996 NVIDIA, Corp. NVIDIA design patents pending in the U.S.
-and foreign countries.
-
-NVIDIA, CORP. MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE
-CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WAR-
-RANTY OF ANY KIND. NVIDIA, CORP. DISCLAIMS ALL WARRANTIES WITH REGARD TO
-THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA, CORP. BE LIABLE
-FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAM-
-AGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE.
-
-2.4 GLX Public License
-
-GLX PUBLIC LICENSE (Version 1.0 (2/11/99)) ("License")
-
-Subject to any third party claims, Silicon Graphics, Inc. ("SGI") hereby
-grants permission to Recipient (defined below), under Recipient's copyrights
-in the Original Software (defined below), to use, copy, modify, merge, pub-
-lish, distribute, sublicense and/or sell copies of Subject Software (defined
-below), and to permit persons to whom the Subject Software is furnished in
-accordance with this License to do the same, subject to all of the following
-terms and conditions, which Recipient accepts by engaging in any such use,
-copying, modifying, merging, publishing, distributing, sublicensing or sell-
-ing:
-
-1. Definitions.
-
- (a) "Original Software" means source code of computer software code
- which is described in Exhibit A as Original Software.
-
- (b) "Modifications" means any addition to or deletion from the sub-
- stance or structure of either the Original Software or any previous
- Modifications. When Subject Software is released as a series of
- files, a Modification means (i) any addition to or deletion from
- the contents of a file containing Original Software or previous
- Modifications and (ii) any new file that contains any part of the
- Original Code or previous Modifications.
-
- (c) "Subject Software" means the Original Software or Modifications
- or the combination of the Original Software and Modifications, or
- portions of any of the foregoing.
-
- (d) "Recipient" means an individual or a legal entity exercising
- rights under, and complying with all of the terms of, this License.
- For legal entities, "Recipient" includes any entity which controls,
- is controlled by, or is under common control with Recipient. For
- purposes of this definition, "control" of an entity means (a) the
- power, direct or indirect, to direct or manage such entity, or (b)
- ownership of fifty percent (50%) or more of the outstanding shares
- or beneficial ownership of such entity.
-
-2. Redistribution of Source Code Subject to These Terms. Redistributions of
-Subject Software in source code form must retain the notice set forth in
-Exhibit A, below, in every file. A copy of this License must be included in
-any documentation for such Subject Software where the recipients' rights
-relating to Subject Software are described. Recipient may distribute the
-source code version of Subject Software under a license of Recipient's
-choice, which may contain terms different from this License, provided that
-(i) Recipient is in compliance with the terms of this License, and (ii) the
-license terms include this Section 2 and Sections 3, 4, 7, 8, 10, 12 and 13
-of this License, which terms may not be modified or superseded by any other
-terms of such license. If Recipient distributes the source code version under
-a different license Recipient must make it absolutely clear that any terms
-which differ from this License are offered by Recipient alone, not by SGI.
-Recipient hereby agrees to indemnify SGI for any liability incurred by SGI as
-a result of any such terms Recipient offers.
-
-3. Redistribution in Executable Form. The notice set forth in Exhibit A must
-be conspicuously included in any notice in an executable version of Subject
-Software, related documentation or collateral in which Recipient describes
-the user's rights relating to the Subject Software. Recipient may distribute
-the executable version of Subject Software under a license of Recipient's
-choice, which may contain terms different from this License, provided that
-(i) Recipient is in compliance with the terms of this License, and (ii) the
-license terms include this Section 3 and Sections 4, 7, 8, 10, 12 and 13 of
-this License, which terms may not be modified or superseded by any other
-terms of such license. If Recipient distributes the executable version under
-a different license Recipient must make it absolutely clear that any terms
-which differ from this License are offered by Recipient alone, not by SGI.
-Recipient hereby agrees to indemnify SGI for any liability incurred by SGI as
-a result of any such terms Recipient offers.
-
-4. Termination. This License and the rights granted hereunder will terminate
-automatically if Recipient fails to comply with terms herein and fails to
-cure such breach within 30 days of the breach. Any sublicense to the Subject
-Software which is properly granted shall survive any termination of this
-License absent termination by the terms of such sublicense. Provisions which,
-by their nature, must remain in effect beyond the termination of this License
-shall survive.
-
-5. No Trademark Rights. This License does not grant any rights to use any
-trade name, trademark or service mark whatsoever. No trade name, trademark or
-service mark of SGI may be used to endorse or promote products derived from
-the Subject Software without prior written permission of SGI.
-
-6. No Other Rights. This License does not grant any rights with respect to
-the OpenGL API or to any software or hardware implementation thereof or to
-any other software whatsoever, nor shall any other rights or licenses not
-expressly granted hereunder arise by implication, estoppel or otherwise with
-respect to the Subject Software. Title to and ownership of the Original Soft-
-ware at all times remains with SGI. All rights in the Original Software not
-expressly granted under this License are reserved.
-
-7. Compliance with Laws; Non-Infringement. Recipient shall comply with all
-applicable laws and regulations in connection with use and distribution of
-the Subject Software, including but not limited to, all export and import
-control laws and regulations of the U.S. government and other countries.
-Recipient may not distribute Subject Software that (i) in any way infringes
-(directly or contributorily) the rights (including patent, copyright, trade
-secret, trademark or other intellectual property rights of any kind) of any
-other person or entity or (ii) breaches any representation or warranty,
-express, implied or statutory, which under any applicable law it might be
-deemed to have been distributed.
-
-8. Claims of Infringement. If Recipient at any time has knowledge of any one
-or more third party claims that reproduction, modification, use, distribu-
-tion, import or sale of Subject Software (including particular functionality
-or code incorporated in Subject Software) infringes the third party's intel-
-lectual property rights, Recipient must place in a well-identified web page
-bearing the title "LEGAL" a description of each such claim and a description
-of the party making each such claim in sufficient detail that a user of the
-Subject Software will know whom to contact regarding the claim. Also, upon
-gaining such knowledge of any such claim, Recipient must conspicuously
-include the URL for such web page in the Exhibit A notice required under Sec-
-tions 2 and 3, above, and in the text of any related documentation, license
-agreement or collateral in which Recipient describes end user's rights relat-
-ing to the Subject Software. If Recipient obtains such knowledge after it
-makes Subject Software available to any other person or entity, Recipient
-shall take other steps (such as notifying appropriate mailing lists or news-
-groups) reasonably calculated to inform those who received the Subject Soft-
-ware that new knowledge has been obtained.
-
-9. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
-WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
-LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS, MER-
-CHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON- INFRINGING. SGI ASSUMES NO
-RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE
-PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY SER-
-VICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
-ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED
-HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THE-
-ORY, WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIA-
-BILITY), CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR
-ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
-CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK
-STOPPAGE, LOSS OF DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF
-THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY
-TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SGI's NEGLIGENCE TO
-THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO
-NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES,
-SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO RECIPIENT.
-
-11. Indemnity. Recipient shall be solely responsible for damages arising,
-directly or indirectly, out of its utilization of rights under this License.
-Recipient will defend, indemnify and hold harmless Silicon Graphics, Inc.
-from and against any loss, liability, damages, costs or expenses (including
-the payment of reasonable attorneys fees) arising out of Recipient's use,
-modification, reproduction and distribution of the Subject Software or out of
-any representation or warranty made by Recipient.
-
-12. U.S. Government End Users. The Subject Software is a "commercial item"
-consisting of "commercial computer software" as such terms are defined in
-title 48 of the Code of Federal Regulations and all U.S. Government End
-Users acquire only the rights set forth in this License and are subject to
-the terms of this License.
-
-13. Miscellaneous. This License represents the complete agreement concerning
-subject matter hereof. If any provision of this License is held to be unen-
-forceable, such provision shall be reformed so as to achieve as nearly as
-possible the same economic effect as the original provision and the remainder
-of this License will remain in effect. This License shall be governed by and
-construed in accordance with the laws of the United States and the State of
-California as applied to agreements entered into and to be performed entirely
-within California between California residents. Any litigation relating to
-this License shall be subject to the exclusive jurisdiction of the Federal
-Courts of the Northern District of California (or, absent subject matter
-jurisdiction in such courts, the courts of the State of California), with
-venue lying exclusively in Santa Clara County, California, with the losing
-party responsible for costs, including without limitation, court costs and
-reasonable attorneys fees and expenses. The application of the United Nations
-Convention on Contracts for the International Sale of Goods is expressly
-excluded. Any law or regulation which provides that the language of a con-
-tract shall be construed against the drafter shall not apply to this License.
-
-Exhibit A
-
-The contents of this file are subject to Sections 2, 3, 4, 7, 8, 10, 12 and
-13 of the GLX Public License Version 1.0 (the "License"). You may not use
-this file except in compliance with those sections of the License. You may
-obtain a copy of the License at Silicon Graphics, Inc., attn: Legal Services,
-2011 N. Shoreline Blvd., Mountain View, CA 94043 or at
-http://www.sgi.com/software/opensource/glx/license.html.
-
-Software distributed under the License is distributed on an "AS IS" basis.
-ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED
-WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF NON-
-INFRINGEMENT. See the License for the specific language governing rights and
-limitations under the License.
-
-The Original Software is GLX version 1.2 source code, released February,
-1999. The developer of the Original Software is Silicon Graphics, Inc. Those
-portions of the Subject Software created by Silicon Graphics, Inc. are Copy-
-right (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved.
-
-2.5 CID Font Code Public License
-
-CID FONT CODE PUBLIC LICENSE (Version 1.0 (3/31/99))("License")
-
-Subject to any applicable third party claims, Silicon Graphics, Inc. ("SGI")
-hereby grants permission to Recipient (defined below), under SGI's copyrights
-in the Original Software (defined below), to use, copy, modify, merge, pub-
-lish, distribute, sublicense and/or sell copies of Subject Software (defined
-below) in both source code and executable form, and to permit persons to whom
-the Subject Software is furnished in accordance with this License to do the
-same, subject to all of the following terms and conditions, which Recipient
-accepts by engaging in any such use, copying, modifying, merging, publica-
-tion, distributing, sublicensing or selling:
-
-1. Definitions.
-
- a. "Original Software" means source code of computer software code
- that is described in Exhibit A as Original Software.
-
- b. "Modifications" means any addition to or deletion from the sub-
- stance or structure of either the Original Software or any previous
- Modifications. When Subject Software is released as a series of
- files, a Modification means (i) any addition to or deletion from
- the contents of a file containing Original Software or previous
- Modifications and (ii) any new file that contains any part of the
- Original Code or previous Modifications.
-
- c. "Subject Software" means the Original Software or Modifications
- or the combination of the Original Software and Modifications, or
- portions of any of the foregoing.
-
- d. "Recipient" means an individual or a legal entity exercising
- rights under the terms of this License. For legal entities, "Recip-
- ient" includes any entity that controls, is controlled by, or is
- under common control with Recipient. For purposes of this defini-
- tion, "control" of an entity means (i) the power, direct or indi-
- rect, to direct or manage such entity, or (ii) ownership of fifty
- percent (50%) or more of the outstanding shares or beneficial own-
- ership of such entity.
-
- e. "Required Notice" means the notice set forth in Exhibit A to
- this License.
-
- f. "Accompanying Technology" means any software or other technology
- that is not a Modification and that is distributed or made publicly
- available by Recipient with the Subject Software. Separate soft-
- ware files that do not contain any Original Software or any previ-
- ous Modification shall not be deemed a Modification, even if such
- software files are aggregated as part of a product, or in any
- medium of storage, with any file that does contain Original Soft-
- ware or any previous Modification.
-
-2. License Terms. All distribution of the Subject Software must be made sub-
-ject to the terms of this License. A copy of this License and the Required
-Notice must be included in any documentation for Subject Software where
-Recipient's rights relating to Subject Software and/or any Accompanying Tech-
-nology are described. Distributions of Subject Software in source code form
-must also include the Required Notice in every file distributed. In addition,
-a ReadMe file entitled "Important Legal Notice" must be distributed with each
-distribution of one or more files that incorporate Subject Software. That
-file must be included with distributions made in both source code and exe-
-cutable form. A copy of the License and the Required Notice must be included
-in that file. Recipient may distribute Accompanying Technology under a
-license of Recipient's choice, which may contain terms different from this
-License, provided that (i) Recipient is in compliance with the terms of this
-License, (ii) such other license terms do not modify or supersede the terms
-of this License as applicable to the Subject Software, (iii) Recipient hereby
-indemnifies SGI for any liability incurred by SGI as a result of the distri-
-bution of Accompanying Technology or the use of other license terms.
-
-3. Termination. This License and the rights granted hereunder will terminate
-automatically if Recipient fails to comply with terms herein and fails to
-cure such breach within 30 days of the breach. Any sublicense to the Subject
-Software that is properly granted shall survive any termination of this
-License absent termination by the terms of such sublicense. Provisions which,
-by their nature, must remain in effect beyond the termination of this License
-shall survive.
-
-4. Trademark Rights. This License does not grant any rights to use any trade
-name, trademark or service mark whatsoever. No trade name, trademark or ser-
-vice mark of SGI may be used to endorse or promote products derived from or
-incorporating any Subject Software without prior written permission of SGI.
-
-5. No Other Rights. No rights or licenses not expressly granted hereunder
-shall arise by implication, estoppel or otherwise. Title to and ownership of
-the Original Software at all times remains with SGI. All rights in the Origi-
-nal Software not expressly granted under this License are reserved.
-
-6. Compliance with Laws; Non-Infringement. Recipient shall comply with all
-applicable laws and regulations in connection with use and distribution of
-the Subject Software, including but not limited to, all export and import
-control laws and regulations of the U.S. government and other countries.
-Recipient may not distribute Subject Software that (i) in any way infringes
-(directly or contributorily) the rights (including patent, copyright, trade
-secret, trademark or other intellectual property rights of any kind) of any
-other person or entity, or (ii) breaches any representation or warranty,
-express, implied or statutory, which under any applicable law it might be
-deemed to have been distributed.
-
-7. Claims of Infringement. If Recipient at any time has knowledge of any one
-or more third party claims that reproduction, modification, use, distribu-
-tion, import or sale of Subject Software (including particular functionality
-or code incorporated in Subject Software) infringes the third party's intel-
-lectual property rights, Recipient must place in a well-identified web page
-bearing the title "LEGAL" a description of each such claim and a description
-of the party making each such claim in sufficient detail that a user of the
-Subject Software will know whom to contact regarding the claim. Also, upon
-gaining such knowledge of any such claim, Recipient must conspicuously
-include the URL for such web page in the Required Notice, and in the text of
-any related documentation, license agreement or collateral in which Recipient
-describes end user's rights relating to the Subject Software. If Recipient
-obtains such knowledge after it makes Subject Software available to any other
-person or entity, Recipient shall take other steps (such as notifying appro-
-priate mailing lists or newsgroups) reasonably calculated to provide such
-knowledge to those who received the Subject Software.
-
-8. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
-WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
-LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS, MER-
-CHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. SGI ASSUMES NO
-RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE
-PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY SER-
-VICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
-ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED
-HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY,
-WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY),
-CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SUBJECT SOFTWARE OR
-THE USE OR OTHER DEALINGS IN THE SUBJECT SOFTWARE. SOME JURISDICTIONS DO NOT
-ALLOW THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES, SO THIS EXCLUSION AND
-LIMITATION MAY NOT APPLY TO RECIPIENT TO THE EXTENT SO DISALLOWED.
-
-10. Indemnity. Recipient shall be solely responsible for damages arising,
-directly or indirectly, out of its utilization of rights under this License.
-Recipient will defend, indemnify and hold SGI and its successors and assigns
-harmless from and against any loss, liability, damages, costs or expenses
-(including the payment of reasonable attorneys fees) arising out of (Recipi-
-ent's use, modification, reproduction and distribution of the Subject Soft-
-ware or out of any representation or warranty made by Recipient.
-
-11. U.S. Government End Users. The Subject Software is a "commercial item"
-consisting of "commercial computer software" as such terms are defined in
-title 48 of the Code of Federal Regulations and all U.S. Government End Users
-acquire only the rights set forth in this License and are subject to the
-terms of this License.
-
-12. Miscellaneous. This License represents the complete agreement concerning
-subject matter hereof. If any provision of this License is held to be unen-
-forceable by any judicial or administrative authority having proper jurisdic-
-tion with respect thereto, such provision shall be reformed so as to achieve
-as nearly as possible the same economic effect as the original provision and
-the remainder of this License will remain in effect. This License shall be
-governed by and construed in accordance with the laws of the United States
-and the State of California as applied to agreements entered into and to be
-performed entirely within California between California residents. Any liti-
-gation relating to this License shall be subject to the exclusive jurisdic-
-tion of the Federal Courts of the Northern District of California (or, absent
-subject matter jurisdiction in such courts, the courts of the State of Cali-
-fornia), with venue lying exclusively in Santa Clara County, California, with
-the losing party responsible for costs, including without limitation, court
-costs and reasonable attorneys fees and expenses. The application of the
-United Nations Convention on Contracts for the International Sale of Goods is
-expressly excluded. Any law or regulation that provides that the language of
-a contract shall be construed against the drafter shall not apply to this
-License.
-
-Exhibit A
-
-Copyright (c) 1994-1999 Silicon Graphics, Inc.
-
-The contents of this file are subject to the CID Font Code Public License
-Version 1.0 (the "License"). You may not use this file except in compliance
-with the License. You may obtain a copy of the License at Silicon Graphics,
-Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
-or at http://www.sgi.com/software/opensource/cid/license.html
-
-Software distributed under the License is distributed on an "AS IS" basis.
-ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED
-WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF NON-
-INFRINGEMENT. See the License for the specific language governing rights and
-limitations under the License.
-
-The Original Software (as defined in the License) is CID font code that was
-developed by Silicon Graphics, Inc. Those portions of the Subject Software
-(as defined in the License) that were created by Silicon Graphics, Inc. are
-Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved.
-
-[NOTE: When using this text in connection with Subject Software delivered
-solely in object code form, Recipient may replace the words "this file" with
-"this software" in both the first and second sentences.]
-
-Additional copyright(s)/license(s):
-
-********************************************************************************
-
-SGI FREE SOFTWARE LICENSE B (Version 1.1 [02/22/2000])
-
-1. Definitions.
-
-1.1. "Additional Notice Provisions" means such additional provisions as
-appear in the Notice in Original Code under the heading "Additional Notice
-Provisions."
-1.2. "Covered Code" means the Original Code or Modifications, or any
-combination thereof.
-1.3. "Hardware" means any physical device that accepts input, processes
-input, stores the results of processing, and/or provides output.
-1.4. "Larger Work" means a work that combines Covered Code or portions
-thereof with code not governed by the terms of this License.
-1.5. "Licensable" means having the right to grant, to the maximum extent
-possible, whether at the time of the initial grant or subsequently
-acquired, any and all of the rights conveyed herein.
-1.6. "License" means this document.
-1.7. "Licensed Patents" means patent claims Licensable by SGI that are
-infringed by the use or sale of Original Code or any Modifications provided
-by SGI, or any combination thereof.
-1.8. "Modifications" means any addition to or deletion from the substance
-or structure of the Original Code or any previous Modifications. When
-Covered Code is released as a series of files, a Modification is:
- A. Any addition to the contents of a file containing Original Code and/or
- addition to or deletion from the contents of a file containing previous
- Modifications.
- B. Any new file that contains any part of the Original Code or previous
- Modifications.
-1.9. "Notice" means any notice in Original Code or Covered Code, as
-required by and in compliance with this License.
-1.10. "Original Code" means source code of computer software code that is
-described in the source code Notice required by Exhibit A as Original Code,
-and updates and error corrections specifically thereto.
-1.11. "Recipient" means an individual or a legal entity exercising rights
-under, and complying with all of the terms of, this License or a future
-version of this License issued under Section 8. For legal entities,
-"Recipient" includes any entity that controls, is controlled by, or is
-under common control with Recipient. For purposes of this definition,
-"control" of an entity means (a) the power, direct or indirect, to direct
-or manage such entity, or (b) ownership of fifty percent (50%) or more of
-the outstanding shares or beneficial ownership of such entity.
-1.12. "Recipient Patents" means patent claims Licensable by a Recipient
-that are infringed by the use or sale of Original Code or any Modifications
-provided by SGI, or any combination thereof.
-1.13. "SGI" means Silicon Graphics, Inc.
-1.14. "SGI Patents" means patent claims Licensable by SGI other than the
-Licensed Patents.
-
-2. License Grant and Restrictions.
-
-2.1. SGI License Grant. Subject to the terms of this License and any third
-party intellectual property claims, for the duration of intellectual
-property protections inherent in the Original Code, SGI hereby grants
-Recipient a worldwide, royaltyÂfree, nonÂexclusive license, to do the
-following: (i) under copyrights Licensable by SGI, to reproduce,
-distribute, create derivative works from, and, to the extent applicable,
-display and perform the Original Code and/or any Modifications provided by
-SGI alone and/or as part of a Larger Work; and (ii) under any Licensable
-Patents, to make, have made, use, sell, offer for sale, import and/or
-otherwise transfer the Original Code and/or any Modifications provided by
-SGI. Recipient accepts the terms and conditions of this License by
-undertaking any of the aforementioned actions. The patent license shall
-apply to the Covered Code if, at the time any related Modification is
-added, such addition of the Modification causes such combination to be
-covered by the Licensed Patents. The patent license in Section 2.1(ii)
-shall not apply to any other combinations that include the Modification.
-No patent license is provided under SGI Patents for infringements of SGI
-Patents by Modifications not provided by SGI or combinations of Original
-Code and Modifications not provided by SGI.
-
-2.2. Recipient License Grant. Subject to the terms of this License and any
-third party intellectual property claims, Recipient hereby grants SGI and
-any other Recipients a worldwide, royaltyÂfree, nonÂexclusive license,
-under any Recipient Patents, to make, have made, use, sell, offer for sale,
-import and/or otherwise transfer the Original Code and/or any Modifications
-provided by SGI.
-
-2.3. No License For Hardware Implementations. The licenses granted in
-Section 2.1 and 2.2 are not applicable to implementation in Hardware of the
-algorithms embodied in the Original Code or any Modifications provided by
-SGI .
-
-3. Redistributions.
-
-3.1. Retention of Notice/Copy of License. The Notice set forth in Exhibit
-A, below, must be conspicuously retained or included in any and all
-redistributions of Covered Code. For distributions of the Covered Code in
-source code form, the Notice must appear in every file that can include a
-text comments field; in executable form, the Notice and a copy of this
-License must appear in related documentation or collateral where the
-Recipient's rights relating to Covered Code are described. Any Additional
-Notice Provisions which actually appears in the Original Code must also be
-retained or included in any and all redistributions of Covered Code.
-
-3.2. Alternative License. Provided that Recipient is in compliance with the
-terms of this License, Recipient may, so long as without derogation of any
-of SGI's rights in and to the Original Code, distribute the source code
-and/or executable version(s) of Covered Code under (1) this License; (2) a
-license identical to this License but for only such changes as are
-necessary in order to clarify Recipient's role as licensor of
-Modifications; and/or (3) a license of Recipient's choosing, containing
-terms different from this License, provided that the license terms include
-this Section 3 and Sections 4, 6, 7, 10, 12, and 13, which terms may not be
-modified or superseded by any other terms of such license. If Recipient
-elects to use any license other than this License, Recipient must make it
-absolutely clear that any of its terms which differ from this License are
-offered by Recipient alone, and not by SGI. It is emphasized that this
-License is a limited license, and, regardless of the license form employed
-by Recipient in accordance with this Section 3.2, Recipient may relicense
-only such rights, in Original Code and Modifications by SGI, as it has
-actually been granted by SGI in this License.
-
-3.3. Indemnity. Recipient hereby agrees to indemnify SGI for any liability
-incurred by SGI as a result of any such alternative license terms Recipient
-offers.
-
-4. Termination. This License and the rights granted hereunder will
-terminate automatically if Recipient breaches any term herein and fails to
-cure such breach within 30 days thereof. Any sublicense to the Covered Code
-that is properly granted shall survive any termination of this License,
-absent termination by the terms of such sublicense. Provisions that, by
-their nature, must remain in effect beyond the termination of this License,
-shall survive.
-
-5. No Trademark Or Other Rights. This License does not grant any rights to:
-(i) any software apart from the Covered Code, nor shall any other rights or
-licenses not expressly granted hereunder arise by implication, estoppel or
-otherwise with respect to the Covered Code; (ii) any trade name, trademark
-or service mark whatsoever, including without limitation any related right
-for purposes of endorsement or promotion of products derived from the
-Covered Code, without prior written permission of SGI; or (iii) any title
-to or ownership of the Original Code, which shall at all times remains with
-SGI. All rights in the Original Code not expressly granted under this
-License are reserved.
-
-6. Compliance with Laws; NonÂInfringement. There are various worldwide
-laws, regulations, and executive orders applicable to dispositions of
-Covered Code, including without limitation export, reÂexport, and import
-control laws, regulations, and executive orders, of the U.S. government and
-other countries, and Recipient is reminded it is obliged to obey such laws,
-regulations, and executive orders. Recipient may not distribute Covered
-Code that (i) in any way infringes (directly or contributorily) any
-intellectual property rights of any kind of any other person or entity or
-(ii) breaches any representation or warranty, express, implied or
-statutory, to which, under any applicable law, it might be deemed to have
-been subject.
-
-7. Claims of Infringement. If Recipient learns of any third party claim
-that any disposition of Covered Code and/or functionality wholly or
-partially infringes the third party's intellectual property rights,
-Recipient will promptly notify SGI of such claim.
-
-8. Versions of the License. SGI may publish revised and/or new versions of
-the License from time to time, each with a distinguishing version number.
-Once Covered Code has been published under a particular version of the
-License, Recipient may, for the duration of the license, continue to use it
-under the terms of that version, or choose to use such Covered Code under
-the terms of any subsequent version published by SGI. Subject to the
-provisions of Sections 3 and 4 of this License, only SGI may modify the
-terms applicable to Covered Code created under this License.
-
-9. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED "AS IS." ALL EXPRESS
-AND IMPLIED WARRANTIES AND CONDITIONS ARE DISCLAIMED, INCLUDING, WITHOUT
-LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY,
-SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, AND
-NONÂINFRINGEMENT. SGI ASSUMES NO RISK AS TO THE QUALITY AND PERFORMANCE OF
-THE SOFTWARE. SHOULD THE SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, SGI
-ASSUMES NO COST OR LIABILITY FOR SERVICING, REPAIR OR CORRECTION. THIS
-DISCLAIMER OF WARRANTY IS AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
-COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT SUBJECT TO THIS DISCLAIMER.
-
-10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES NOR LEGAL THEORY,
-WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT
-LIABILITY), CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE
-FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF
-ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
-WORK STOPPAGE, LOSS OF DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND
-ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY
-SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM
-SGI's NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION.
-SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL
-OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO
-RECIPIENT.
-
-11. Indemnity. Recipient shall be solely responsible for damages arising,
-directly or indirectly, out of its utilization of rights under this
-License. Recipient will defend, indemnify and hold harmless Silicon
-Graphics, Inc. from and against any loss, liability, damages, costs or
-expenses (including the payment of reasonable attorneys fees) arising out
-of Recipient's use, modification, reproduction and distribution of the
-Covered Code or out of any representation or warranty made by Recipient.
-
-12. U.S. Government End Users. The Covered Code is a "commercial item"
-consisting of "commercial computer software" as such terms are defined in
-title 48 of the Code of Federal Regulations and all U.S. Government End
-Users acquire only the rights set forth in this License and are subject to
-the terms of this License.
-
-13. Miscellaneous. This License represents the complete agreement
-concerning the its subject matter. If any provision of this License is held
-to be unenforceable, such provision shall be reformed so as to achieve as
-nearly as possible the same legal and economic effect as the original
-provision and the remainder of this License will remain in effect. This
-License shall be governed by and construed in accordance with the laws of
-the United States and the State of California as applied to agreements
-entered into and to be performed entirely within California between
-California residents. Any litigation relating to this License shall be
-subject to the exclusive jurisdiction of the Federal Courts of the Northern
-District of California (or, absent subject matter jurisdiction in such
-courts, the courts of the State of California), with venue lying
-exclusively in Santa Clara County, California, with the losing party
-responsible for costs, including without limitation, court costs and
-reasonable attorneys fees and expenses. The application of the United
-Nations Convention on Contracts for the International Sale of Goods is
-expressly excluded. Any law or regulation that provides that the language
-of a contract shall be construed against the drafter shall not apply to
-this License.
-
-Exhibit A License Applicability.
-
-Except to the extent portions of this file are made subject to an
-alternative license as permitted in the SGI Free Software License B,
-Version 1.1 (the "License"), the contents of this file are subject only to
-the provisions of the License. You may not use this file except in
-compliance with the License. You may obtain a copy of the License at
-Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway,
-Mountain View, CA 94043Â1351, or at: http://oss.sgi.com/projects/FreeB Note
-that, as provided in the License, the Software is distributed on an "AS IS"
-basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED,
-INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF
-MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE,
-AND NONÂINFRINGEMENT. Original Code. The Original Code is: [name of
-software, version number, and release date], developed by Silicon Graphics,
-Inc. The Original Code is Copyright (c) [dates of first publication, as
-appearing in the Notice in the Original Code] Silicon Graphics, Inc.
-Copyright in any portions created by third parties is as indicated
-elsewhere herein. All Rights Reserved.
-
-Additional Notice Provisions:
-
-[such additional provisions, if any, as appear in the Notice in the
-Original Code under the heading "Additional Notice Provisions"]
--- /dev/null
+The fonts were obtained from the debian package xfree86.
+The copyright file from this package is included here.
+
+
+Package: xfree86
+Obtained from: XFree86 CVS repository (anoncvs@anoncvs.xfree86.org:/cvs)
+Upstream author(s): The XFree86 Project, Inc., et al.
+Debian package author(s): Stephen Early, Mark Eichin, Branden Robinson
+
+Debian modifications to upstream sources:
+
+ The following files were removed from the source package due to
+ non-DFSG-compliant licensing:
+ xc/fonts/scaled/Type1/COPYRIGHT.BH
+ xc/fonts/scaled/Type1/COPYRIGHT.IBM
+ xc/fonts/scaled/Type1/UTBI____.afm
+ xc/fonts/scaled/Type1/UTBI____.pfa
+ xc/fonts/scaled/Type1/UTB_____.afm
+ xc/fonts/scaled/Type1/UTB_____.pfa
+ xc/fonts/scaled/Type1/UTI_____.afm
+ xc/fonts/scaled/Type1/UTI_____.pfa
+ xc/fonts/scaled/Type1/UTRG____.afm
+ xc/fonts/scaled/Type1/UTRG____.pfa
+ xc/fonts/scaled/Type1/cour.afm
+ xc/fonts/scaled/Type1/cour.pfa
+ xc/fonts/scaled/Type1/courb.afm
+ xc/fonts/scaled/Type1/courb.pfa
+ xc/fonts/scaled/Type1/courbi.afm
+ xc/fonts/scaled/Type1/courbi.pfa
+ xc/fonts/scaled/Type1/couri.afm
+ xc/fonts/scaled/Type1/couri.pfa
+ xc/fonts/scaled/Type1/lcdxmo.afm
+ xc/fonts/scaled/Type1/lcdxmo.pfa
+ xc/fonts/scaled/Type1/lcdxmr.afm
+ xc/fonts/scaled/Type1/lcdxmr.pfa
+ xc/fonts/scaled/Type1/lcdxro.afm
+ xc/fonts/scaled/Type1/lcdxro.pfa
+ xc/fonts/scaled/Type1/lcdxrr.afm
+ xc/fonts/scaled/Type1/lcdxrr.pfa
+ xc/fonts/scaled/Type1/lcdxso.afm
+ xc/fonts/scaled/Type1/lcdxso.pfa
+ xc/fonts/scaled/Type1/lcdxsr.afm
+ xc/fonts/scaled/Type1/lcdxsr.pfa
+
+ See the debian/patches directory for all other changes to upstream
+ source.
+
+Debian copyright(s)/license(s):
+
+Unless otherwise noted, all modifications and additions to XFree86 found in
+this Debian package bear the following copyright and license terms:
+
+Copyright 1996-2001 Software in the Public Interest, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+SOFTWARE IN THE PUBLIC INTEREST, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Software in the Public
+Interest, Inc. shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Software without prior written
+authorization from Software in the Public Interest, Inc.
+
+Upstream copyright(s)/license(s):
+
+********************************************************************************
+
+1. XFree86 License
+
+XFree86 code without an explicit copyright is covered by the following copy-
+right/license:
+
+Copyright (C) 1994-2001 The XFree86 Project, Inc. All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is fur-
+nished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
+NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
+NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the XFree86 Project shall not
+be used in advertising or otherwise to promote the sale, use or other deal-
+ings in this Software without prior written authorization from the XFree86
+Project.
+
+2. Other Licenses
+
+Portions of code are covered by the following licenses/copyrights:
+
+2.1 X Consortium
+
+Copyright (C) 1996 X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is fur-
+nished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
+NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X
+CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+X Window System is a trademark of X Consortium, Inc.
+
+2.2 Berkeley-based copyrights:
+
+2.2.1 General
+
+Redistribution and use in source and binary forms, with or without modifica-
+tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
+CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
+CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
+ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+2.2.2 UCB/LBL
+
+Copyright (c) 1993 The Regents of the University of California. All rights
+reserved.
+
+This software was developed by the Computer Systems Engineering group at
+Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and contributed to
+Berkeley.
+
+All advertising materials mentioning features or use of this software must
+display the following acknowledgement: This product includes software devel-
+oped by the University of California, Lawrence Berkeley Laboratory.
+
+Redistribution and use in source and binary forms, with or without modifica-
+tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement: This product includes soft-
+ ware developed by the University of California, Berkeley and its con-
+ tributors.
+
+ 4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DIS-
+CLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+2.3 NVIDIA Corp
+
+Copyright (c) 1996 NVIDIA, Corp. All rights reserved.
+
+NOTICE TO USER: The source code is copyrighted under U.S. and international
+laws. NVIDIA, Corp. of Sunnyvale, California owns the copyright and as
+design patents pending on the design and interface of the NV chips. Users
+and possessors of this source code are hereby granted a nonexclusive, roy-
+alty-free copyright and design patent license to use this code in individual
+and commercial software.
+
+Any use of this source code must include, in the user documentation and
+internal comments to the code, notices to the end user as follows:
+
+Copyright (c) 1996 NVIDIA, Corp. NVIDIA design patents pending in the U.S.
+and foreign countries.
+
+NVIDIA, CORP. MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE
+CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WAR-
+RANTY OF ANY KIND. NVIDIA, CORP. DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA, CORP. BE LIABLE
+FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAM-
+AGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE.
+
+2.4 GLX Public License
+
+GLX PUBLIC LICENSE (Version 1.0 (2/11/99)) ("License")
+
+Subject to any third party claims, Silicon Graphics, Inc. ("SGI") hereby
+grants permission to Recipient (defined below), under Recipient's copyrights
+in the Original Software (defined below), to use, copy, modify, merge, pub-
+lish, distribute, sublicense and/or sell copies of Subject Software (defined
+below), and to permit persons to whom the Subject Software is furnished in
+accordance with this License to do the same, subject to all of the following
+terms and conditions, which Recipient accepts by engaging in any such use,
+copying, modifying, merging, publishing, distributing, sublicensing or sell-
+ing:
+
+1. Definitions.
+
+ (a) "Original Software" means source code of computer software code
+ which is described in Exhibit A as Original Software.
+
+ (b) "Modifications" means any addition to or deletion from the sub-
+ stance or structure of either the Original Software or any previous
+ Modifications. When Subject Software is released as a series of
+ files, a Modification means (i) any addition to or deletion from
+ the contents of a file containing Original Software or previous
+ Modifications and (ii) any new file that contains any part of the
+ Original Code or previous Modifications.
+
+ (c) "Subject Software" means the Original Software or Modifications
+ or the combination of the Original Software and Modifications, or
+ portions of any of the foregoing.
+
+ (d) "Recipient" means an individual or a legal entity exercising
+ rights under, and complying with all of the terms of, this License.
+ For legal entities, "Recipient" includes any entity which controls,
+ is controlled by, or is under common control with Recipient. For
+ purposes of this definition, "control" of an entity means (a) the
+ power, direct or indirect, to direct or manage such entity, or (b)
+ ownership of fifty percent (50%) or more of the outstanding shares
+ or beneficial ownership of such entity.
+
+2. Redistribution of Source Code Subject to These Terms. Redistributions of
+Subject Software in source code form must retain the notice set forth in
+Exhibit A, below, in every file. A copy of this License must be included in
+any documentation for such Subject Software where the recipients' rights
+relating to Subject Software are described. Recipient may distribute the
+source code version of Subject Software under a license of Recipient's
+choice, which may contain terms different from this License, provided that
+(i) Recipient is in compliance with the terms of this License, and (ii) the
+license terms include this Section 2 and Sections 3, 4, 7, 8, 10, 12 and 13
+of this License, which terms may not be modified or superseded by any other
+terms of such license. If Recipient distributes the source code version under
+a different license Recipient must make it absolutely clear that any terms
+which differ from this License are offered by Recipient alone, not by SGI.
+Recipient hereby agrees to indemnify SGI for any liability incurred by SGI as
+a result of any such terms Recipient offers.
+
+3. Redistribution in Executable Form. The notice set forth in Exhibit A must
+be conspicuously included in any notice in an executable version of Subject
+Software, related documentation or collateral in which Recipient describes
+the user's rights relating to the Subject Software. Recipient may distribute
+the executable version of Subject Software under a license of Recipient's
+choice, which may contain terms different from this License, provided that
+(i) Recipient is in compliance with the terms of this License, and (ii) the
+license terms include this Section 3 and Sections 4, 7, 8, 10, 12 and 13 of
+this License, which terms may not be modified or superseded by any other
+terms of such license. If Recipient distributes the executable version under
+a different license Recipient must make it absolutely clear that any terms
+which differ from this License are offered by Recipient alone, not by SGI.
+Recipient hereby agrees to indemnify SGI for any liability incurred by SGI as
+a result of any such terms Recipient offers.
+
+4. Termination. This License and the rights granted hereunder will terminate
+automatically if Recipient fails to comply with terms herein and fails to
+cure such breach within 30 days of the breach. Any sublicense to the Subject
+Software which is properly granted shall survive any termination of this
+License absent termination by the terms of such sublicense. Provisions which,
+by their nature, must remain in effect beyond the termination of this License
+shall survive.
+
+5. No Trademark Rights. This License does not grant any rights to use any
+trade name, trademark or service mark whatsoever. No trade name, trademark or
+service mark of SGI may be used to endorse or promote products derived from
+the Subject Software without prior written permission of SGI.
+
+6. No Other Rights. This License does not grant any rights with respect to
+the OpenGL API or to any software or hardware implementation thereof or to
+any other software whatsoever, nor shall any other rights or licenses not
+expressly granted hereunder arise by implication, estoppel or otherwise with
+respect to the Subject Software. Title to and ownership of the Original Soft-
+ware at all times remains with SGI. All rights in the Original Software not
+expressly granted under this License are reserved.
+
+7. Compliance with Laws; Non-Infringement. Recipient shall comply with all
+applicable laws and regulations in connection with use and distribution of
+the Subject Software, including but not limited to, all export and import
+control laws and regulations of the U.S. government and other countries.
+Recipient may not distribute Subject Software that (i) in any way infringes
+(directly or contributorily) the rights (including patent, copyright, trade
+secret, trademark or other intellectual property rights of any kind) of any
+other person or entity or (ii) breaches any representation or warranty,
+express, implied or statutory, which under any applicable law it might be
+deemed to have been distributed.
+
+8. Claims of Infringement. If Recipient at any time has knowledge of any one
+or more third party claims that reproduction, modification, use, distribu-
+tion, import or sale of Subject Software (including particular functionality
+or code incorporated in Subject Software) infringes the third party's intel-
+lectual property rights, Recipient must place in a well-identified web page
+bearing the title "LEGAL" a description of each such claim and a description
+of the party making each such claim in sufficient detail that a user of the
+Subject Software will know whom to contact regarding the claim. Also, upon
+gaining such knowledge of any such claim, Recipient must conspicuously
+include the URL for such web page in the Exhibit A notice required under Sec-
+tions 2 and 3, above, and in the text of any related documentation, license
+agreement or collateral in which Recipient describes end user's rights relat-
+ing to the Subject Software. If Recipient obtains such knowledge after it
+makes Subject Software available to any other person or entity, Recipient
+shall take other steps (such as notifying appropriate mailing lists or news-
+groups) reasonably calculated to inform those who received the Subject Soft-
+ware that new knowledge has been obtained.
+
+9. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
+LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS, MER-
+CHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON- INFRINGING. SGI ASSUMES NO
+RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE
+PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY SER-
+VICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
+ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED
+HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THE-
+ORY, WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIA-
+BILITY), CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR
+ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
+CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK
+STOPPAGE, LOSS OF DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
+COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF
+THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY
+TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SGI's NEGLIGENCE TO
+THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO
+NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES,
+SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO RECIPIENT.
+
+11. Indemnity. Recipient shall be solely responsible for damages arising,
+directly or indirectly, out of its utilization of rights under this License.
+Recipient will defend, indemnify and hold harmless Silicon Graphics, Inc.
+from and against any loss, liability, damages, costs or expenses (including
+the payment of reasonable attorneys fees) arising out of Recipient's use,
+modification, reproduction and distribution of the Subject Software or out of
+any representation or warranty made by Recipient.
+
+12. U.S. Government End Users. The Subject Software is a "commercial item"
+consisting of "commercial computer software" as such terms are defined in
+title 48 of the Code of Federal Regulations and all U.S. Government End
+Users acquire only the rights set forth in this License and are subject to
+the terms of this License.
+
+13. Miscellaneous. This License represents the complete agreement concerning
+subject matter hereof. If any provision of this License is held to be unen-
+forceable, such provision shall be reformed so as to achieve as nearly as
+possible the same economic effect as the original provision and the remainder
+of this License will remain in effect. This License shall be governed by and
+construed in accordance with the laws of the United States and the State of
+California as applied to agreements entered into and to be performed entirely
+within California between California residents. Any litigation relating to
+this License shall be subject to the exclusive jurisdiction of the Federal
+Courts of the Northern District of California (or, absent subject matter
+jurisdiction in such courts, the courts of the State of California), with
+venue lying exclusively in Santa Clara County, California, with the losing
+party responsible for costs, including without limitation, court costs and
+reasonable attorneys fees and expenses. The application of the United Nations
+Convention on Contracts for the International Sale of Goods is expressly
+excluded. Any law or regulation which provides that the language of a con-
+tract shall be construed against the drafter shall not apply to this License.
+
+Exhibit A
+
+The contents of this file are subject to Sections 2, 3, 4, 7, 8, 10, 12 and
+13 of the GLX Public License Version 1.0 (the "License"). You may not use
+this file except in compliance with those sections of the License. You may
+obtain a copy of the License at Silicon Graphics, Inc., attn: Legal Services,
+2011 N. Shoreline Blvd., Mountain View, CA 94043 or at
+http://www.sgi.com/software/opensource/glx/license.html.
+
+Software distributed under the License is distributed on an "AS IS" basis.
+ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED
+WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF NON-
+INFRINGEMENT. See the License for the specific language governing rights and
+limitations under the License.
+
+The Original Software is GLX version 1.2 source code, released February,
+1999. The developer of the Original Software is Silicon Graphics, Inc. Those
+portions of the Subject Software created by Silicon Graphics, Inc. are Copy-
+right (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved.
+
+2.5 CID Font Code Public License
+
+CID FONT CODE PUBLIC LICENSE (Version 1.0 (3/31/99))("License")
+
+Subject to any applicable third party claims, Silicon Graphics, Inc. ("SGI")
+hereby grants permission to Recipient (defined below), under SGI's copyrights
+in the Original Software (defined below), to use, copy, modify, merge, pub-
+lish, distribute, sublicense and/or sell copies of Subject Software (defined
+below) in both source code and executable form, and to permit persons to whom
+the Subject Software is furnished in accordance with this License to do the
+same, subject to all of the following terms and conditions, which Recipient
+accepts by engaging in any such use, copying, modifying, merging, publica-
+tion, distributing, sublicensing or selling:
+
+1. Definitions.
+
+ a. "Original Software" means source code of computer software code
+ that is described in Exhibit A as Original Software.
+
+ b. "Modifications" means any addition to or deletion from the sub-
+ stance or structure of either the Original Software or any previous
+ Modifications. When Subject Software is released as a series of
+ files, a Modification means (i) any addition to or deletion from
+ the contents of a file containing Original Software or previous
+ Modifications and (ii) any new file that contains any part of the
+ Original Code or previous Modifications.
+
+ c. "Subject Software" means the Original Software or Modifications
+ or the combination of the Original Software and Modifications, or
+ portions of any of the foregoing.
+
+ d. "Recipient" means an individual or a legal entity exercising
+ rights under the terms of this License. For legal entities, "Recip-
+ ient" includes any entity that controls, is controlled by, or is
+ under common control with Recipient. For purposes of this defini-
+ tion, "control" of an entity means (i) the power, direct or indi-
+ rect, to direct or manage such entity, or (ii) ownership of fifty
+ percent (50%) or more of the outstanding shares or beneficial own-
+ ership of such entity.
+
+ e. "Required Notice" means the notice set forth in Exhibit A to
+ this License.
+
+ f. "Accompanying Technology" means any software or other technology
+ that is not a Modification and that is distributed or made publicly
+ available by Recipient with the Subject Software. Separate soft-
+ ware files that do not contain any Original Software or any previ-
+ ous Modification shall not be deemed a Modification, even if such
+ software files are aggregated as part of a product, or in any
+ medium of storage, with any file that does contain Original Soft-
+ ware or any previous Modification.
+
+2. License Terms. All distribution of the Subject Software must be made sub-
+ject to the terms of this License. A copy of this License and the Required
+Notice must be included in any documentation for Subject Software where
+Recipient's rights relating to Subject Software and/or any Accompanying Tech-
+nology are described. Distributions of Subject Software in source code form
+must also include the Required Notice in every file distributed. In addition,
+a ReadMe file entitled "Important Legal Notice" must be distributed with each
+distribution of one or more files that incorporate Subject Software. That
+file must be included with distributions made in both source code and exe-
+cutable form. A copy of the License and the Required Notice must be included
+in that file. Recipient may distribute Accompanying Technology under a
+license of Recipient's choice, which may contain terms different from this
+License, provided that (i) Recipient is in compliance with the terms of this
+License, (ii) such other license terms do not modify or supersede the terms
+of this License as applicable to the Subject Software, (iii) Recipient hereby
+indemnifies SGI for any liability incurred by SGI as a result of the distri-
+bution of Accompanying Technology or the use of other license terms.
+
+3. Termination. This License and the rights granted hereunder will terminate
+automatically if Recipient fails to comply with terms herein and fails to
+cure such breach within 30 days of the breach. Any sublicense to the Subject
+Software that is properly granted shall survive any termination of this
+License absent termination by the terms of such sublicense. Provisions which,
+by their nature, must remain in effect beyond the termination of this License
+shall survive.
+
+4. Trademark Rights. This License does not grant any rights to use any trade
+name, trademark or service mark whatsoever. No trade name, trademark or ser-
+vice mark of SGI may be used to endorse or promote products derived from or
+incorporating any Subject Software without prior written permission of SGI.
+
+5. No Other Rights. No rights or licenses not expressly granted hereunder
+shall arise by implication, estoppel or otherwise. Title to and ownership of
+the Original Software at all times remains with SGI. All rights in the Origi-
+nal Software not expressly granted under this License are reserved.
+
+6. Compliance with Laws; Non-Infringement. Recipient shall comply with all
+applicable laws and regulations in connection with use and distribution of
+the Subject Software, including but not limited to, all export and import
+control laws and regulations of the U.S. government and other countries.
+Recipient may not distribute Subject Software that (i) in any way infringes
+(directly or contributorily) the rights (including patent, copyright, trade
+secret, trademark or other intellectual property rights of any kind) of any
+other person or entity, or (ii) breaches any representation or warranty,
+express, implied or statutory, which under any applicable law it might be
+deemed to have been distributed.
+
+7. Claims of Infringement. If Recipient at any time has knowledge of any one
+or more third party claims that reproduction, modification, use, distribu-
+tion, import or sale of Subject Software (including particular functionality
+or code incorporated in Subject Software) infringes the third party's intel-
+lectual property rights, Recipient must place in a well-identified web page
+bearing the title "LEGAL" a description of each such claim and a description
+of the party making each such claim in sufficient detail that a user of the
+Subject Software will know whom to contact regarding the claim. Also, upon
+gaining such knowledge of any such claim, Recipient must conspicuously
+include the URL for such web page in the Required Notice, and in the text of
+any related documentation, license agreement or collateral in which Recipient
+describes end user's rights relating to the Subject Software. If Recipient
+obtains such knowledge after it makes Subject Software available to any other
+person or entity, Recipient shall take other steps (such as notifying appro-
+priate mailing lists or newsgroups) reasonably calculated to provide such
+knowledge to those who received the Subject Software.
+
+8. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
+LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS, MER-
+CHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. SGI ASSUMES NO
+RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE
+PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY SER-
+VICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
+ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED
+HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY,
+WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY),
+CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SUBJECT SOFTWARE OR
+THE USE OR OTHER DEALINGS IN THE SUBJECT SOFTWARE. SOME JURISDICTIONS DO NOT
+ALLOW THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES, SO THIS EXCLUSION AND
+LIMITATION MAY NOT APPLY TO RECIPIENT TO THE EXTENT SO DISALLOWED.
+
+10. Indemnity. Recipient shall be solely responsible for damages arising,
+directly or indirectly, out of its utilization of rights under this License.
+Recipient will defend, indemnify and hold SGI and its successors and assigns
+harmless from and against any loss, liability, damages, costs or expenses
+(including the payment of reasonable attorneys fees) arising out of (Recipi-
+ent's use, modification, reproduction and distribution of the Subject Soft-
+ware or out of any representation or warranty made by Recipient.
+
+11. U.S. Government End Users. The Subject Software is a "commercial item"
+consisting of "commercial computer software" as such terms are defined in
+title 48 of the Code of Federal Regulations and all U.S. Government End Users
+acquire only the rights set forth in this License and are subject to the
+terms of this License.
+
+12. Miscellaneous. This License represents the complete agreement concerning
+subject matter hereof. If any provision of this License is held to be unen-
+forceable by any judicial or administrative authority having proper jurisdic-
+tion with respect thereto, such provision shall be reformed so as to achieve
+as nearly as possible the same economic effect as the original provision and
+the remainder of this License will remain in effect. This License shall be
+governed by and construed in accordance with the laws of the United States
+and the State of California as applied to agreements entered into and to be
+performed entirely within California between California residents. Any liti-
+gation relating to this License shall be subject to the exclusive jurisdic-
+tion of the Federal Courts of the Northern District of California (or, absent
+subject matter jurisdiction in such courts, the courts of the State of Cali-
+fornia), with venue lying exclusively in Santa Clara County, California, with
+the losing party responsible for costs, including without limitation, court
+costs and reasonable attorneys fees and expenses. The application of the
+United Nations Convention on Contracts for the International Sale of Goods is
+expressly excluded. Any law or regulation that provides that the language of
+a contract shall be construed against the drafter shall not apply to this
+License.
+
+Exhibit A
+
+Copyright (c) 1994-1999 Silicon Graphics, Inc.
+
+The contents of this file are subject to the CID Font Code Public License
+Version 1.0 (the "License"). You may not use this file except in compliance
+with the License. You may obtain a copy of the License at Silicon Graphics,
+Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
+or at http://www.sgi.com/software/opensource/cid/license.html
+
+Software distributed under the License is distributed on an "AS IS" basis.
+ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED
+WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF NON-
+INFRINGEMENT. See the License for the specific language governing rights and
+limitations under the License.
+
+The Original Software (as defined in the License) is CID font code that was
+developed by Silicon Graphics, Inc. Those portions of the Subject Software
+(as defined in the License) that were created by Silicon Graphics, Inc. are
+Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved.
+
+[NOTE: When using this text in connection with Subject Software delivered
+solely in object code form, Recipient may replace the words "this file" with
+"this software" in both the first and second sentences.]
+
+Additional copyright(s)/license(s):
+
+********************************************************************************
+
+SGI FREE SOFTWARE LICENSE B (Version 1.1 [02/22/2000])
+
+1. Definitions.
+
+1.1. "Additional Notice Provisions" means such additional provisions as
+appear in the Notice in Original Code under the heading "Additional Notice
+Provisions."
+1.2. "Covered Code" means the Original Code or Modifications, or any
+combination thereof.
+1.3. "Hardware" means any physical device that accepts input, processes
+input, stores the results of processing, and/or provides output.
+1.4. "Larger Work" means a work that combines Covered Code or portions
+thereof with code not governed by the terms of this License.
+1.5. "Licensable" means having the right to grant, to the maximum extent
+possible, whether at the time of the initial grant or subsequently
+acquired, any and all of the rights conveyed herein.
+1.6. "License" means this document.
+1.7. "Licensed Patents" means patent claims Licensable by SGI that are
+infringed by the use or sale of Original Code or any Modifications provided
+by SGI, or any combination thereof.
+1.8. "Modifications" means any addition to or deletion from the substance
+or structure of the Original Code or any previous Modifications. When
+Covered Code is released as a series of files, a Modification is:
+ A. Any addition to the contents of a file containing Original Code and/or
+ addition to or deletion from the contents of a file containing previous
+ Modifications.
+ B. Any new file that contains any part of the Original Code or previous
+ Modifications.
+1.9. "Notice" means any notice in Original Code or Covered Code, as
+required by and in compliance with this License.
+1.10. "Original Code" means source code of computer software code that is
+described in the source code Notice required by Exhibit A as Original Code,
+and updates and error corrections specifically thereto.
+1.11. "Recipient" means an individual or a legal entity exercising rights
+under, and complying with all of the terms of, this License or a future
+version of this License issued under Section 8. For legal entities,
+"Recipient" includes any entity that controls, is controlled by, or is
+under common control with Recipient. For purposes of this definition,
+"control" of an entity means (a) the power, direct or indirect, to direct
+or manage such entity, or (b) ownership of fifty percent (50%) or more of
+the outstanding shares or beneficial ownership of such entity.
+1.12. "Recipient Patents" means patent claims Licensable by a Recipient
+that are infringed by the use or sale of Original Code or any Modifications
+provided by SGI, or any combination thereof.
+1.13. "SGI" means Silicon Graphics, Inc.
+1.14. "SGI Patents" means patent claims Licensable by SGI other than the
+Licensed Patents.
+
+2. License Grant and Restrictions.
+
+2.1. SGI License Grant. Subject to the terms of this License and any third
+party intellectual property claims, for the duration of intellectual
+property protections inherent in the Original Code, SGI hereby grants
+Recipient a worldwide, royaltyÂfree, nonÂexclusive license, to do the
+following: (i) under copyrights Licensable by SGI, to reproduce,
+distribute, create derivative works from, and, to the extent applicable,
+display and perform the Original Code and/or any Modifications provided by
+SGI alone and/or as part of a Larger Work; and (ii) under any Licensable
+Patents, to make, have made, use, sell, offer for sale, import and/or
+otherwise transfer the Original Code and/or any Modifications provided by
+SGI. Recipient accepts the terms and conditions of this License by
+undertaking any of the aforementioned actions. The patent license shall
+apply to the Covered Code if, at the time any related Modification is
+added, such addition of the Modification causes such combination to be
+covered by the Licensed Patents. The patent license in Section 2.1(ii)
+shall not apply to any other combinations that include the Modification.
+No patent license is provided under SGI Patents for infringements of SGI
+Patents by Modifications not provided by SGI or combinations of Original
+Code and Modifications not provided by SGI.
+
+2.2. Recipient License Grant. Subject to the terms of this License and any
+third party intellectual property claims, Recipient hereby grants SGI and
+any other Recipients a worldwide, royaltyÂfree, nonÂexclusive license,
+under any Recipient Patents, to make, have made, use, sell, offer for sale,
+import and/or otherwise transfer the Original Code and/or any Modifications
+provided by SGI.
+
+2.3. No License For Hardware Implementations. The licenses granted in
+Section 2.1 and 2.2 are not applicable to implementation in Hardware of the
+algorithms embodied in the Original Code or any Modifications provided by
+SGI .
+
+3. Redistributions.
+
+3.1. Retention of Notice/Copy of License. The Notice set forth in Exhibit
+A, below, must be conspicuously retained or included in any and all
+redistributions of Covered Code. For distributions of the Covered Code in
+source code form, the Notice must appear in every file that can include a
+text comments field; in executable form, the Notice and a copy of this
+License must appear in related documentation or collateral where the
+Recipient's rights relating to Covered Code are described. Any Additional
+Notice Provisions which actually appears in the Original Code must also be
+retained or included in any and all redistributions of Covered Code.
+
+3.2. Alternative License. Provided that Recipient is in compliance with the
+terms of this License, Recipient may, so long as without derogation of any
+of SGI's rights in and to the Original Code, distribute the source code
+and/or executable version(s) of Covered Code under (1) this License; (2) a
+license identical to this License but for only such changes as are
+necessary in order to clarify Recipient's role as licensor of
+Modifications; and/or (3) a license of Recipient's choosing, containing
+terms different from this License, provided that the license terms include
+this Section 3 and Sections 4, 6, 7, 10, 12, and 13, which terms may not be
+modified or superseded by any other terms of such license. If Recipient
+elects to use any license other than this License, Recipient must make it
+absolutely clear that any of its terms which differ from this License are
+offered by Recipient alone, and not by SGI. It is emphasized that this
+License is a limited license, and, regardless of the license form employed
+by Recipient in accordance with this Section 3.2, Recipient may relicense
+only such rights, in Original Code and Modifications by SGI, as it has
+actually been granted by SGI in this License.
+
+3.3. Indemnity. Recipient hereby agrees to indemnify SGI for any liability
+incurred by SGI as a result of any such alternative license terms Recipient
+offers.
+
+4. Termination. This License and the rights granted hereunder will
+terminate automatically if Recipient breaches any term herein and fails to
+cure such breach within 30 days thereof. Any sublicense to the Covered Code
+that is properly granted shall survive any termination of this License,
+absent termination by the terms of such sublicense. Provisions that, by
+their nature, must remain in effect beyond the termination of this License,
+shall survive.
+
+5. No Trademark Or Other Rights. This License does not grant any rights to:
+(i) any software apart from the Covered Code, nor shall any other rights or
+licenses not expressly granted hereunder arise by implication, estoppel or
+otherwise with respect to the Covered Code; (ii) any trade name, trademark
+or service mark whatsoever, including without limitation any related right
+for purposes of endorsement or promotion of products derived from the
+Covered Code, without prior written permission of SGI; or (iii) any title
+to or ownership of the Original Code, which shall at all times remains with
+SGI. All rights in the Original Code not expressly granted under this
+License are reserved.
+
+6. Compliance with Laws; NonÂInfringement. There are various worldwide
+laws, regulations, and executive orders applicable to dispositions of
+Covered Code, including without limitation export, reÂexport, and import
+control laws, regulations, and executive orders, of the U.S. government and
+other countries, and Recipient is reminded it is obliged to obey such laws,
+regulations, and executive orders. Recipient may not distribute Covered
+Code that (i) in any way infringes (directly or contributorily) any
+intellectual property rights of any kind of any other person or entity or
+(ii) breaches any representation or warranty, express, implied or
+statutory, to which, under any applicable law, it might be deemed to have
+been subject.
+
+7. Claims of Infringement. If Recipient learns of any third party claim
+that any disposition of Covered Code and/or functionality wholly or
+partially infringes the third party's intellectual property rights,
+Recipient will promptly notify SGI of such claim.
+
+8. Versions of the License. SGI may publish revised and/or new versions of
+the License from time to time, each with a distinguishing version number.
+Once Covered Code has been published under a particular version of the
+License, Recipient may, for the duration of the license, continue to use it
+under the terms of that version, or choose to use such Covered Code under
+the terms of any subsequent version published by SGI. Subject to the
+provisions of Sections 3 and 4 of this License, only SGI may modify the
+terms applicable to Covered Code created under this License.
+
+9. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED "AS IS." ALL EXPRESS
+AND IMPLIED WARRANTIES AND CONDITIONS ARE DISCLAIMED, INCLUDING, WITHOUT
+LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY,
+SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, AND
+NONÂINFRINGEMENT. SGI ASSUMES NO RISK AS TO THE QUALITY AND PERFORMANCE OF
+THE SOFTWARE. SHOULD THE SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, SGI
+ASSUMES NO COST OR LIABILITY FOR SERVICING, REPAIR OR CORRECTION. THIS
+DISCLAIMER OF WARRANTY IS AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
+COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT SUBJECT TO THIS DISCLAIMER.
+
+10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES NOR LEGAL THEORY,
+WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT
+LIABILITY), CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE
+FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF
+ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
+WORK STOPPAGE, LOSS OF DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND
+ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
+INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY
+SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM
+SGI's NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION.
+SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL
+OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO
+RECIPIENT.
+
+11. Indemnity. Recipient shall be solely responsible for damages arising,
+directly or indirectly, out of its utilization of rights under this
+License. Recipient will defend, indemnify and hold harmless Silicon
+Graphics, Inc. from and against any loss, liability, damages, costs or
+expenses (including the payment of reasonable attorneys fees) arising out
+of Recipient's use, modification, reproduction and distribution of the
+Covered Code or out of any representation or warranty made by Recipient.
+
+12. U.S. Government End Users. The Covered Code is a "commercial item"
+consisting of "commercial computer software" as such terms are defined in
+title 48 of the Code of Federal Regulations and all U.S. Government End
+Users acquire only the rights set forth in this License and are subject to
+the terms of this License.
+
+13. Miscellaneous. This License represents the complete agreement
+concerning the its subject matter. If any provision of this License is held
+to be unenforceable, such provision shall be reformed so as to achieve as
+nearly as possible the same legal and economic effect as the original
+provision and the remainder of this License will remain in effect. This
+License shall be governed by and construed in accordance with the laws of
+the United States and the State of California as applied to agreements
+entered into and to be performed entirely within California between
+California residents. Any litigation relating to this License shall be
+subject to the exclusive jurisdiction of the Federal Courts of the Northern
+District of California (or, absent subject matter jurisdiction in such
+courts, the courts of the State of California), with venue lying
+exclusively in Santa Clara County, California, with the losing party
+responsible for costs, including without limitation, court costs and
+reasonable attorneys fees and expenses. The application of the United
+Nations Convention on Contracts for the International Sale of Goods is
+expressly excluded. Any law or regulation that provides that the language
+of a contract shall be construed against the drafter shall not apply to
+this License.
+
+Exhibit A License Applicability.
+
+Except to the extent portions of this file are made subject to an
+alternative license as permitted in the SGI Free Software License B,
+Version 1.1 (the "License"), the contents of this file are subject only to
+the provisions of the License. You may not use this file except in
+compliance with the License. You may obtain a copy of the License at
+Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway,
+Mountain View, CA 94043Â1351, or at: http://oss.sgi.com/projects/FreeB Note
+that, as provided in the License, the Software is distributed on an "AS IS"
+basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED,
+INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF
+MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE,
+AND NONÂINFRINGEMENT. Original Code. The Original Code is: [name of
+software, version number, and release date], developed by Silicon Graphics,
+Inc. The Original Code is Copyright (c) [dates of first publication, as
+appearing in the Notice in the Original Code] Silicon Graphics, Inc.
+Copyright in any portions created by third parties is as indicated
+elsewhere herein. All Rights Reserved.
+
+Additional Notice Provisions:
+
+[such additional provisions, if any, as appear in the Notice in the
+Original Code under the heading "Additional Notice Provisions"]
--- /dev/null
+Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.\r
+\r
+This Font Software is licensed under the SIL Open Font License, Version 1.1.\r
+\r
+This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL\r
+\r
+\r
+-----------------------------------------------------------\r
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007\r
+-----------------------------------------------------------\r
+\r
+PREAMBLE\r
+The goals of the Open Font License (OFL) are to stimulate worldwide\r
+development of collaborative font projects, to support the font creation\r
+efforts of academic and linguistic communities, and to provide a free and\r
+open framework in which fonts may be shared and improved in partnership\r
+with others.\r
+\r
+The OFL allows the licensed fonts to be used, studied, modified and\r
+redistributed freely as long as they are not sold by themselves. The\r
+fonts, including any derivative works, can be bundled, embedded, \r
+redistributed and/or sold with any software provided that any reserved\r
+names are not used by derivative works. The fonts and derivatives,\r
+however, cannot be released under any other type of license. The\r
+requirement for fonts to remain under this license does not apply\r
+to any document created using the fonts or their derivatives.\r
+\r
+DEFINITIONS\r
+"Font Software" refers to the set of files released by the Copyright\r
+Holder(s) under this license and clearly marked as such. This may\r
+include source files, build scripts and documentation.\r
+\r
+"Reserved Font Name" refers to any names specified as such after the\r
+copyright statement(s).\r
+\r
+"Original Version" refers to the collection of Font Software components as\r
+distributed by the Copyright Holder(s).\r
+\r
+"Modified Version" refers to any derivative made by adding to, deleting,\r
+or substituting -- in part or in whole -- any of the components of the\r
+Original Version, by changing formats or by porting the Font Software to a\r
+new environment.\r
+\r
+"Author" refers to any designer, engineer, programmer, technical\r
+writer or other person who contributed to the Font Software.\r
+\r
+PERMISSION & CONDITIONS\r
+Permission is hereby granted, free of charge, to any person obtaining\r
+a copy of the Font Software, to use, study, copy, merge, embed, modify,\r
+redistribute, and sell modified and unmodified copies of the Font\r
+Software, subject to the following conditions:\r
+\r
+1) Neither the Font Software nor any of its individual components,\r
+in Original or Modified Versions, may be sold by itself.\r
+\r
+2) Original or Modified Versions of the Font Software may be bundled,\r
+redistributed and/or sold with any software, provided that each copy\r
+contains the above copyright notice and this license. These can be\r
+included either as stand-alone text files, human-readable headers or\r
+in the appropriate machine-readable metadata fields within text or\r
+binary files as long as those fields can be easily viewed by the user.\r
+\r
+3) No Modified Version of the Font Software may use the Reserved Font\r
+Name(s) unless explicit written permission is granted by the corresponding\r
+Copyright Holder. This restriction only applies to the primary font name as\r
+presented to the users.\r
+\r
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font\r
+Software shall not be used to promote, endorse or advertise any\r
+Modified Version, except to acknowledge the contribution(s) of the\r
+Copyright Holder(s) and the Author(s) or with their explicit written\r
+permission.\r
+\r
+5) The Font Software, modified or unmodified, in part or in whole,\r
+must be distributed entirely under this license, and must not be\r
+distributed under any other license. The requirement for fonts to\r
+remain under this license does not apply to any document created\r
+using the Font Software.\r
+\r
+TERMINATION\r
+This license becomes null and void if any of the above conditions are\r
+not met.\r
+\r
+DISCLAIMER\r
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\r
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT\r
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE\r
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL\r
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM\r
+OTHER DEALINGS IN THE FONT SOFTWARE.\r
#include "mtdraspberry.h"\r
#include "remotelinux.h"\r
#include "ledraspberry.h"\r
-#include "osdopengl.h"\r
+#include "osdopenvg.h"\r
#include "audioomx.h"\r
#include "videoomx.h"\r
\r
debugEnabled = true; // and...\r
case 'n':\r
daemonize = false;\r
- break; \r
+ break;\r
case 's':\r
setServer = optarg;\r
break;\r
return 1;\r
}\r
}\r
- \r
+\r
// Init global vars ------------------------------------------------------------------------------------------------\r
logger = new Log();\r
timers = new Timers();\r
command = new Command();\r
wol = new Wol();\r
sleeptimer = new Sleeptimer();\r
- \r
+\r
if (!logger || !remote || !mtd || !led || !osd || !video || !audio || !boxstack || !command || !wol || !sleeptimer)\r
{\r
printf("Could not create objects. Memory problems?\n");\r
success = led->init(((RemoteMVP*)remote)->getDevice());\r
#else\r
success = led->init(-1);\r
-#endif \r
+#endif\r
if (success)\r
{\r
logger->log("Core", Log::INFO, "LED module initialised");\r
{
public:
OsdMVP();
- ~OsdMVP();
+ virtual ~OsdMVP();
int init(void* device);
int shutdown();
\r
void OsdOpenGL::Blank() {\r
BeginPainting();\r
- glClearColor(0.15f, 0.25f, 0.35f, 1.0f); // change this to black after testing\r
+ glClearColor(0.15f, 1.f, 0.35f, 1.0f); // change this to black after testing\r
glClear( GL_COLOR_BUFFER_BIT );\r
glClear( GL_DEPTH_BUFFER_BIT );\r
EndPainting();\r
--- /dev/null
+/*\r
+ Copyright 2004-2005 Chris Tallon, 2006,2011-2012 Marten Richter\r
+\r
+ This file is part of VOMP.\r
+\r
+ VOMP is free software; you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation; either version 2 of the License, or\r
+ (at your option) any later version.\r
+\r
+ VOMP is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with VOMP; if not, write to the Free Software\r
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
+*/\r
+\r
+\r
+#include "osdopenvg.h"\r
+#include "mtd.h"\r
+#include "videoomx.h"\r
+#include <Magick++.h>\r
+\r
+#include "message.h"\r
+#include "command.h"\r
+\r
+#include <sys/syscall.h>\r
+#include <vector>\r
+#include <math.h>\r
+\r
+using namespace Magick;\r
+\r
+extern uint8_t font_data[] asm("_binary_fonts_sourcesans_ttf_start");\r
+extern uint8_t font_data_end[] asm("_binary_fonts_sourcesans_ttf_end");\r
+extern uint8_t vdr_data[] asm("_binary_other_vdrhires_jpg_start");\r
+extern uint8_t vdr_data_end[] asm("_binary_other_vdrhires_jpg_end");\r
+extern uint8_t wallpaper_data[] asm("_binary_other_wallpaper720p_jpg_start");\r
+extern uint8_t wallpaper_data_end[] asm("_binary_other_wallpaper720p_jpg_end");\r
+\r
+\r
+#define BACKBUFFER_WIDTH 1280\r
+#define BACKBUFFER_HEIGHT 720\r
+\r
+\r
+OsdOpenVG::OsdOpenVG()\r
+{\r
+ vgmutex.Lock();\r
+ taskmutex.Lock();\r
+ lastrendertime=getTimeMS();\r
+ display_height=0;\r
+ display_width=0;\r
+ mode=0;\r
+ aspect_correction=1.;\r
+\r
+ wait_id=1;\r
+\r
+}\r
+\r
+OsdOpenVG::~OsdOpenVG()\r
+{\r
+\r
+ if (initted)\r
+ {\r
+ shutdown();\r
+ }\r
+\r
+\r
+ vgmutex.Unlock();\r
+ taskmutex.Unlock();\r
+}\r
+\r
+\r
+\r
+int OsdOpenVG::init(void* device)\r
+{\r
+ if (initted) return 0;\r
+ Video* video = Video::getInstance();\r
+ //window=*((HWND*)device);\r
+\r
+ // May be this device specific part should go to a device specific child class\r
+\r
+ //init broadcom chipset (Move to video?)\r
+\r
+\r
+ //First get connection to egl\r
+ egl_display=eglGetDisplay(EGL_DEFAULT_DISPLAY);\r
+\r
+ if (egl_display==EGL_NO_DISPLAY) {\r
+ Log::getInstance()->log("OSD", Log::WARN, "Could not get egl display! %x",eglGetError());\r
+ vgmutex.Unlock();\r
+ return 0;\r
+ }\r
+\r
+\r
+\r
+ if (eglInitialize(egl_display, NULL, NULL)==EGL_FALSE) {\r
+ Log::getInstance()->log("OSD", Log::WARN, "Initialising display failed! %x",eglGetError());\r
+ vgmutex.Unlock();\r
+ return 0;\r
+ }\r
+\r
+\r
+ const char *query_str=eglQueryString(egl_display,EGL_CLIENT_APIS);\r
+ if (query_str) Log::getInstance()->logLongString("OSD", Log::NOTICE, query_str);\r
+ else Log::getInstance()->log("OSD", Log::WARN, "Could not query display %x",eglGetError());\r
+ query_str=eglQueryString(egl_display,EGL_EXTENSIONS);\r
+ if (query_str) Log::getInstance()->logLongString("OSD", Log::NOTICE, query_str);\r
+ else Log::getInstance()->log("OSD", Log::WARN, "Could not query display %x",eglGetError());\r
+\r
+ if (eglBindAPI(EGL_OPENVG_API)==EGL_FALSE) {\r
+ Log::getInstance()->log("OSD", Log::WARN, "Binding openvg api failed! %x",eglGetError());\r
+ vgmutex.Unlock();\r
+ return 0;\r
+ }\r
+\r
+ const EGLint attributs[]={\r
+ EGL_RED_SIZE,8,EGL_GREEN_SIZE, 8,EGL_BLUE_SIZE, 8,EGL_ALPHA_SIZE, 8,\r
+ EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_PBUFFER_BIT,\r
+ EGL_CONFORMANT, EGL_OPENVG_BIT,\r
+ EGL_NONE\r
+ }; // Here, we might have to select the resolution!\r
+\r
+\r
+ EGLint number;\r
+\r
+ if (eglChooseConfig(egl_display, attributs, &egl_ourconfig, 1, &number)==EGL_FALSE) {\r
+ Log::getInstance()->log("OSD", Log::WARN, "Choosing egl config failed! %x",eglGetError());\r
+ vgmutex.Unlock();\r
+ return 0;\r
+ }\r
+\r
+\r
+\r
+ egl_context=eglCreateContext(egl_display,egl_ourconfig,NULL,NULL);\r
+ if (egl_context==EGL_NO_CONTEXT) {\r
+ Log::getInstance()->log("OSD", Log::WARN, "Creating egl context failed! %x",eglGetError());\r
+ vgmutex.Unlock();\r
+ return 0;\r
+ }\r
+\r
+ // warning broadcom specific, get display size!\r
+ display_width=display_height=0;\r
+ if (graphics_get_display_size(0, &display_width, &display_height)<0) {\r
+ Log::getInstance()->log("OSD", Log::WARN, "Getting display size failed! (BCM API) ");\r
+ vgmutex.Unlock();\r
+ return 0;\r
+ }\r
+ Log::getInstance()->log("OSD", Log::NOTICE, "Displaysize is %d x %d ",display_width, display_height);\r
+ VC_RECT_T dst_rect ={0,0,display_width,display_height};\r
+ VC_RECT_T src_rect={0,0,BACKBUFFER_WIDTH <<16,BACKBUFFER_HEIGHT<<16};\r
+ VC_RECT_T src_rect_bg={0,0,1<<16,1<<16};\r
+ VC_RECT_T src_rect_im={0,0,1,1};\r
+\r
+ uint32_t back_image_ptr;\r
+ bcm_backres=vc_dispmanx_resource_create(VC_IMAGE_RGB888,1,1,&back_image_ptr);\r
+ unsigned int color=0x00FF0000;\r
+ vc_dispmanx_resource_write_data(bcm_backres,VC_IMAGE_RGB888,4,&color,&src_rect_im);\r
+\r
+ DISPMANX_UPDATE_HANDLE_T bcm_update;\r
+ bcm_display=vc_dispmanx_display_open(0);\r
+ bcm_update=vc_dispmanx_update_start(0);\r
+ bcm_element=vc_dispmanx_element_add(bcm_update,bcm_display,\r
+ 2,&dst_rect, 0,\r
+ &src_rect,DISPMANX_PROTECTION_NONE,0, 0, (DISPMANX_TRANSFORM_T) 0);\r
+\r
+\r
+ bcm_background=vc_dispmanx_element_add(bcm_update,bcm_display,\r
+ 0,&dst_rect,bcm_backres ,\r
+ &src_rect_bg,DISPMANX_PROTECTION_NONE,0, 0, (DISPMANX_TRANSFORM_T) 0);\r
+\r
+ vc_dispmanx_update_submit_sync(bcm_update);\r
+\r
+\r
+\r
+ static EGL_DISPMANX_WINDOW_T nativewindow;\r
+ nativewindow.element=bcm_element;\r
+ nativewindow.height=BACKBUFFER_HEIGHT;\r
+ nativewindow.width=BACKBUFFER_WIDTH;\r
+\r
+ egl_surface = eglCreateWindowSurface(egl_display,egl_ourconfig, &nativewindow,NULL );\r
+ if (egl_surface==EGL_NO_SURFACE) {\r
+ Log::getInstance()->log("OSD", Log::WARN, "Creating egl window surface failed!");\r
+ vgmutex.Unlock();\r
+ return 0;\r
+ }\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "Making egl current in1%d",syscall(SYS_gettid));\r
+ if (eglMakeCurrent(egl_display, egl_surface, egl_surface, egl_context)== EGL_FALSE) {\r
+ Log::getInstance()->log("OSD", Log::WARN, "Making egl Current failed");\r
+ vgmutex.Unlock();\r
+ return 0;\r
+ }\r
+ // Test stuff\r
+\r
+ query_str=(const char*)vgGetString(VG_VERSION) ;\r
+ if (query_str) Log::getInstance()->logLongString("OSD", Log::NOTICE, query_str);\r
+ else Log::getInstance()->log("OSD", Log::WARN, "Could not query display %x",vgGetError());\r
+\r
+ query_str=(const char*)vgGetString(VG_VENDOR) ;\r
+ if (query_str) Log::getInstance()->logLongString("OSD", Log::NOTICE, query_str);\r
+ else Log::getInstance()->log("OSD", Log::WARN, "Could not query display %x",vgGetError());\r
+\r
+ query_str=(const char*)vgGetString(VG_RENDERER) ;\r
+ if (query_str) Log::getInstance()->logLongString("OSD", Log::NOTICE, query_str);\r
+ else Log::getInstance()->log("OSD", Log::WARN, "Could not query display %x",vgGetError());\r
+\r
+ query_str=(const char*)vgGetString(VG_EXTENSIONS) ;\r
+ if (query_str) Log::getInstance()->logLongString("OSD", Log::NOTICE, query_str);\r
+ else Log::getInstance()->log("OSD", Log::WARN, "Could not query display %x",vgGetError());\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+ aspect_correction= ((float)BACKBUFFER_HEIGHT)/576.f/(((float)BACKBUFFER_WIDTH)/720.f);\r
+ initPaths();\r
+ if (!loadFont()) {\r
+ return 0;\r
+ }\r
+\r
+ eglSwapInterval(egl_display, 1 );\r
+\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "Making egl current out 1%d",syscall(SYS_gettid));\r
+ eglMakeCurrent(egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );\r
+ //Now we will create the Screen\r
+ initted = 1; // must set this here or create surface won't work\r
+\r
+\r
+ if (((VideoOMX*)Video::getInstance())->initUsingOSDObjects()!=1) { //call Video for init stuff\r
+ return 0;\r
+ }\r
+ InitializeMagick("");\r
+\r
+ pthread_cond_init(&vgtaskCond, NULL);\r
+ pthread_mutex_init(&vgtaskCondMutex, NULL);\r
+\r
+ threadStart();\r
+ taskmutex.Unlock();\r
+ vgmutex.Unlock();\r
+\r
+\r
+ return 1;\r
+}\r
+\r
+\r
+void OsdOpenVG::initPaths()\r
+{\r
+\r
+\r
+ VGPath current;\r
+ current=vgCreatePath(VG_PATH_FORMAT_STANDARD,\r
+ VG_PATH_DATATYPE_F,1.f,0.f,\r
+ 0,0,VG_PATH_CAPABILITY_ALL);\r
+\r
+ vguLine(current,0.f,0.f,1.f,0.f);\r
+ // HorzLine\r
+ std_paths[HorzLine]=current;\r
+\r
+ current=vgCreatePath(VG_PATH_FORMAT_STANDARD,\r
+ VG_PATH_DATATYPE_F,1.f,0.f,\r
+ 0,0,VG_PATH_CAPABILITY_ALL);\r
+ vguLine(current,0.f,0.f,0.f,1.f);\r
+ // VertLine\r
+ std_paths[VertLine]=current;\r
+\r
+ current=vgCreatePath(VG_PATH_FORMAT_STANDARD,\r
+ VG_PATH_DATATYPE_F,1.f,0.f,\r
+ 0,0,VG_PATH_CAPABILITY_ALL);\r
+ //vguRect(current,0.f,0.f,1.f,1.f);\r
+ vguRect(current,0.f,0.f,1.f,1.f);\r
+ // Rectabgle\r
+ std_paths[Rectangle]=current;\r
+\r
+ current=vgCreatePath(VG_PATH_FORMAT_STANDARD,\r
+ VG_PATH_DATATYPE_F,1.f,0.f,\r
+ 0,0,0);\r
+ vguEllipse(current,0.f,0.f,1.f,1.f);\r
+ // Point\r
+ std_paths[Point]=current;\r
+\r
+}\r
+\r
+void OsdOpenVG::destroyPaths()\r
+{\r
+ vgDestroyPath(std_paths[HorzLine]);\r
+ vgDestroyPath(std_paths[VertLine]);\r
+ vgDestroyPath(std_paths[Rectangle]);\r
+ vgDestroyPath(std_paths[Point]);\r
+\r
+}\r
+\r
+\r
+int OsdOpenVG::shutdown()\r
+{\r
+ if (!initted) return 0;\r
+\r
+ initted = 0;\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "shutdown mark1");\r
+ threadStop();\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "shutdown mark2");\r
+ processTasks();\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "shutdown mark3");\r
+\r
+ taskmutex.Lock();\r
+ vgmutex.Lock();\r
+ (((VideoOMX*)Video::getInstance())->shutdownUsingOSDObjects());\r
+\r
+ FT_Done_Face(ft_face);\r
+ vgDestroyFont(vgfont);\r
+ destroyPaths();\r
+ vgClear(0,0,BACKBUFFER_WIDTH,BACKBUFFER_HEIGHT);\r
+ eglSwapBuffers(egl_display, egl_surface);\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "Making egl current out final");\r
+ eglMakeCurrent(egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );\r
+ eglDestroySurface(egl_display,egl_surface);\r
+ eglDestroyContext(egl_display,egl_context);\r
+ eglTerminate(egl_display );\r
+\r
+ DISPMANX_UPDATE_HANDLE_T bcm_update;\r
+ bcm_update=vc_dispmanx_update_start(0);\r
+\r
+ vc_dispmanx_element_remove(bcm_update,bcm_element);\r
+ vc_dispmanx_element_remove(bcm_update,bcm_background);\r
+ vc_dispmanx_update_submit_sync(bcm_update);\r
+ vc_dispmanx_resource_delete(bcm_backres);\r
+ vc_dispmanx_display_close(bcm_display);\r
+\r
+\r
+\r
+ return 1;\r
+}\r
+\r
+\r
+void OsdOpenVG::threadMethod()\r
+{\r
+ // We have to claim the egl context for this thread\r
+\r
+ if (eglMakeCurrent(egl_display, egl_surface, egl_surface, egl_context)== EGL_FALSE) {\r
+ Log::getInstance()->log("OSD", Log::WARN, "Making egl Current failed in thread %x",eglGetError());\r
+ return;\r
+ }\r
+ int ts=0;\r
+ while (true)\r
+ {\r
+ ts=1;\r
+ unsigned int waittime=1;\r
+\r
+ if (initted) {\r
+\r
+ long long time1 = getTimeMS();\r
+ if ((time1 - lastrendertime) > 200) {//5 fps for OSD updates are enough, avoids tearing\r
+ InternalRendering();\r
+ lastrendertime = getTimeMS();\r
+\r
+ }\r
+ if (processTasks()) ts=0;\r
+ }\r
+ threadCheckExit();\r
+ if (ts!=0) {\r
+ struct timespec target_time;\r
+ clock_gettime(CLOCK_REALTIME,&target_time);\r
+ target_time.tv_nsec+=1000000LL*ts;\r
+ if (target_time.tv_nsec>999999999) {\r
+ target_time.tv_nsec-=1000000000L;\r
+ target_time.tv_sec+=1;\r
+ }\r
+ threadLock();\r
+ threadWaitForSignalTimed(&target_time);\r
+ threadUnlock();\r
+ }\r
+ //Sleep(1);\r
+ }\r
+ //eglMakeCurrent(egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );\r
+}\r
+\r
+\r
+void OsdOpenVG::threadPostStopCleanup()\r
+{\r
+ //Doing nothing\r
+ //goo;\r
+}\r
+\r
+\r
+\r
+\r
+\r
+\r
+void OsdOpenVG::InternalRendering(){\r
+ vgmutex.Lock();\r
+ float colclear[]={1.f,1.0f,1.f,1.f};\r
+ vgSetfv(VG_CLEAR_COLOR,4,colclear);\r
+ vgClear(0,0,BACKBUFFER_WIDTH,BACKBUFFER_HEIGHT);\r
+ vgSeti(VG_BLEND_MODE, VG_BLEND_SRC);\r
+\r
+\r
+ drawSurfaces(); //iterate through and draws all commands\r
+\r
+ //Show it to the user!\r
+ eglSwapBuffers(egl_display, egl_surface);\r
+ vgmutex.Unlock();\r
+\r
+}\r
+\r
+/*font stuff*/\r
+\r
+float OsdOpenVG::getFontHeight()\r
+{\r
+ return font_height; //dummy\r
+}\r
+float OsdOpenVG::getCharWidth(wchar_t c)\r
+{\r
+ unsigned int glyph_index=FT_Get_Char_Index(ft_face,c);\r
+ return font_exp_x[glyph_index];\r
+}\r
+\r
+int OsdOpenVG::loadFont()\r
+{\r
+ int error=FT_Init_FreeType(&ft_library);\r
+ float font_size=16.f;\r
+ if (error)\r
+ {\r
+ Log::getInstance()->log("OSD", Log::WARN, "Could not load freetype %x",error);\r
+ return 0;\r
+ }\r
+\r
+ error=FT_New_Memory_Face(ft_library,font_data,font_data_end-font_data,0,&ft_face );\r
+ if (error) {\r
+ Log::getInstance()->log("OSD", Log::WARN, "Could not load font face %x",error);\r
+ return 0;\r
+ }\r
+ error=FT_Set_Char_Size(ft_face,0,font_size*64,0,0 /*dpi*/);\r
+ if (error) {\r
+ FT_Done_Face(ft_face);\r
+ Log::getInstance()->log("OSD", Log::WARN, "Could not set face size %x",error);\r
+ return 0;\r
+ }\r
+ vgfont=vgCreateFont(0);\r
+ FT_ULong cur_char;\r
+ FT_UInt glyph;\r
+ font_height=ft_face->size->metrics.height/64.f;\r
+ cur_char = FT_Get_First_Char(ft_face,&glyph);\r
+ vector<VGubyte> segments;\r
+ vector<VGfloat> coord;\r
+ segments.reserve(256);\r
+ coord.reserve(1024);\r
+ //Log::getInstance()->log("OSD", Log::DEBUG, "Create Glyph test %d %x %x %d",cur_char,font_data_end,font_data,glyph);\r
+ while (glyph !=0)\r
+ {\r
+ error=FT_Load_Glyph(ft_face,glyph,FT_LOAD_DEFAULT);\r
+ if (error){\r
+ FT_Done_Face(ft_face);\r
+ Log::getInstance()->log("OSD", Log::WARN, "Could not load glyph %x",error);\r
+ return 0;\r
+ }\r
+ VGPath path;\r
+ FT_Outline ot=ft_face->glyph->outline;\r
+ segments.clear();\r
+ coord.clear();\r
+\r
+ if (ot.n_contours ==0) {\r
+ path=VG_INVALID_HANDLE;\r
+ } else {\r
+ path=vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F,\r
+ 1.0f,0.f,0,0,VG_PATH_CAPABILITY_ALL);\r
+\r
+ /* convert glyph */\r
+ FT_Vector *pt=ot.points;\r
+ const char *tags=ot.tags;\r
+ const short* cont=ot.contours;\r
+ short n_cont=ot.n_contours;\r
+ short n_point=ot.n_points;\r
+ short last_cont=0;\r
+ for (short point=0;n_cont!=0;cont++,n_cont--) {\r
+ short next_cont=*cont+1;\r
+ bool first=true;\r
+ char last_tag=0;\r
+ short first_point=point;\r
+ //Log::getInstance()->log("OSD", Log::DEBUG, "runs %d",*cont);\r
+ for (;point<next_cont;point++) {\r
+ char tag=tags[point];\r
+ FT_Vector fpoint=pt[point];\r
+ // Log::getInstance()->log("OSD", Log::DEBUG, "tag %d point %d %d: %d %d",tag,fpoint.x,fpoint.y,point,n_point);\r
+ if (first) {\r
+ segments.push_back(VG_MOVE_TO);\r
+ first=false;\r
+ } else if (tag &0x1) { //on curve\r
+ if (last_tag &0x1) {\r
+ segments.push_back(VG_LINE_TO);\r
+ } else if (last_tag &0x2){\r
+ segments.push_back(VG_CUBIC_TO);\r
+ } else {\r
+ segments.push_back(VG_QUAD_TO);\r
+ }\r
+\r
+ } else {\r
+ if (!(tag &0x2)){\r
+ if (!(last_tag &0x1)) {\r
+ segments.push_back(VG_QUAD_TO);\r
+ int coord_size=coord.size();\r
+ VGfloat x=(coord[coord_size-2]+ ((float)fpoint.x)/64.f)*0.5f*aspect_correction;\r
+ VGfloat y=(coord[coord_size-1]+(font_size- ((float)fpoint.y)/64.f))*0.5f;\r
+ coord.push_back(x);\r
+ coord.push_back(y);\r
+ }\r
+ }\r
+\r
+\r
+ }\r
+ last_tag=tag;\r
+ coord.push_back(((float)fpoint.x)*aspect_correction/64.);\r
+ coord.push_back(font_size-((float)fpoint.y)/64.);\r
+ //Log::getInstance()->log("OSD", Log::DEBUG, "Create APD Glyph coord %d %d %g %g",fpoint.x,fpoint.y,coord[coord.size()-2],coord[coord.size()-1]);\r
+ }\r
+ if (!(last_tag &0x1)) {\r
+ if (last_tag &0x2) {\r
+ segments.push_back(VG_CUBIC_TO);\r
+ } else {\r
+ segments.push_back(VG_QUAD_TO);\r
+ }\r
+ coord.push_back(((float)pt[first_point].x)*aspect_correction/64.);\r
+ coord.push_back(font_size-((float)pt[first_point].y)/64.);\r
+ }\r
+ //segments.push_back(VG_CLOSE_PATH);\r
+\r
+\r
+ }\r
+ vgAppendPathData(path,segments.size(),&segments[0],&coord[0]);\r
+ int n=0;\r
+ /* for (int m=0;m<segments.size();m++) {\r
+ switch (segments[m])\r
+ {\r
+ case VG_MOVE_TO:\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "Move To %g %g",coord[n],coord[n+1]);n+=2; break;\r
+ case VG_LINE_TO:\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "Line To %g %g",coord[n],coord[n+1]);n+=2; break;\r
+ case VG_CUBIC_TO:\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "Cubic To %g %g %g %g %g %g",coord[n],coord[n+1],coord[n+2],coord[n+3],coord[n+4],coord[n+5]);n+=6; break;\r
+ case VG_QUAD_TO:\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "Quad To %g %g %g %g",coord[n],coord[n+1],coord[n+2],coord[n+3]);n+=4; break;\r
+ case VG_CLOSE_PATH:\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "Close Path"); break;\r
+ }\r
+\r
+ }*/\r
+ //vguRect(path,0.f,0.f,1.f,1.f);\r
+ //Log::getInstance()->log("OSD", Log::DEBUG, "Create APD Glyph %d %x",segments.size(),vgGetError());\r
+ }\r
+ VGfloat ori[]={0.f,0.f};\r
+ VGfloat esp[]={ft_face->glyph->advance.x/64.f*aspect_correction,ft_face->glyph->advance.y/64.f};\r
+ font_exp_x[glyph]=ft_face->glyph->advance.x/64.f*aspect_correction; //recalculate\r
+\r
+ vgSetGlyphToPath(vgfont,glyph,path,VG_FALSE,ori,esp);\r
+ //Log::getInstance()->log("OSD", Log::DEBUG, "Create Glyph %d %d %x",path,glyph,vgGetError());\r
+ if (path!=VG_INVALID_HANDLE) {\r
+ vgDestroyPath(path);\r
+ }\r
+ cur_char = FT_Get_Next_Char(ft_face,cur_char,&glyph);\r
+ }\r
+ return 1;\r
+}\r
+\r
+\r
+void OsdOpenVG::drawSetTrans(SurfaceCommands & sc)\r
+{\r
+ vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE);\r
+ vgLoadIdentity();\r
+ vgScale(((float)BACKBUFFER_WIDTH)/720.f, -((float)BACKBUFFER_HEIGHT)/576.f);\r
+ vgTranslate(0.f+sc.x,-576.f+sc.y);\r
+\r
+ vgSeti(VG_MATRIX_MODE, VG_MATRIX_GLYPH_USER_TO_SURFACE);\r
+ vgLoadIdentity();\r
+ vgScale(((float)BACKBUFFER_WIDTH)/720.f, -((float)BACKBUFFER_HEIGHT)/576.f);\r
+ vgTranslate(0.f+sc.x,-576.f+sc.y);\r
+\r
+ vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE);\r
+ vgLoadIdentity();\r
+ vgScale(((float)BACKBUFFER_WIDTH)/720.f, -((float)BACKBUFFER_HEIGHT)/576.f);\r
+ vgTranslate(0.f+sc.x,-576.f+sc.y);\r
+\r
+\r
+\r
+ //vgTranslate(0.f+sc.x,576.f-sc.y);\r
+ //Log::getInstance()->log("OSD", Log::DEBUG, "Draw Translate %g %g",sc.x,sc.y);\r
+\r
+}\r
+void OsdOpenVG::executeDrawCommand(SVGCommand & command)\r
+{\r
+\r
+ VGfloat save_matrix[9];\r
+ switch (command.instr) {\r
+ case DrawPath: {\r
+ vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE);\r
+ // VGuint rgba;\r
+ // rgba = vgGetColor((VGPaint) command.reference);\r
+ //Log::getInstance()->log("OSD", Log::DEBUG, "Draw Path %d %x %g %g %g %g",command.reference,command.target.path_index,command.x,command.y,command.w,command.h);\r
+ //vgSeti(VG_FILL_RULE,);\r
+\r
+ vgGetMatrix(save_matrix);\r
+ vgSetPaint((VGPaint) command.reference,VG_FILL_PATH);\r
+ vgSetPaint((VGPaint) command.reference,VG_STROKE_PATH);\r
+ vgTranslate(command.x,command.y);\r
+ vgScale(command.w,command.h);\r
+ vgDrawPath(std_paths[command.target.path_index],VG_FILL_PATH);\r
+ vgLoadMatrix(save_matrix);\r
+ } break;\r
+ case DrawImage: {\r
+ vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE);\r
+ vgGetMatrix(save_matrix);\r
+ vgTranslate(command.x,command.y);\r
+ //vgScale(command.w,command.h);\r
+ if (command.reference) { //special behaviout for bw images they act as a mask on the current paint\r
+ vgSetPaint((VGPaint) command.reference,VG_FILL_PATH);\r
+ vgSetPaint((VGPaint) command.reference,VG_STROKE_PATH);\r
+ vgSeti(VG_IMAGE_MODE,VG_DRAW_IMAGE_STENCIL);\r
+ vgSeti(VG_BLEND_MODE, VG_BLEND_SRC_OVER);\r
+ vgScale(aspect_correction,1.f);\r
+ } else {\r
+ //vgScale(720.f/((float)BACKBUFFER_WIDTH), 576.f/((float)BACKBUFFER_HEIGHT));\r
+ vgScale(aspect_correction,1.f);\r
+ vgSeti(VG_IMAGE_MODE,VG_DRAW_IMAGE_NORMAL);\r
+ }\r
+\r
+\r
+ //vgLoadIdentity();\r
+ //vgTranslate(200.f,500.f);\r
+ //vgScale(100.f,100.f);\r
+\r
+ vgDrawImage((VGImage) command.target.image);\r
+ //Log::getInstance()->log("OSD", Log::DEBUG, "Draw Image %d %x %g %g %g %g %x",command.reference,command.target.image,command.x,command.y,command.w,command.h,\r
+ // vgGetError());\r
+ if (command.reference) {\r
+ vgSeti(VG_IMAGE_MODE,VG_DRAW_IMAGE_NORMAL);\r
+ vgSeti(VG_BLEND_MODE, VG_BLEND_SRC);\r
+ }\r
+ vgLoadMatrix(save_matrix);\r
+ } break;\r
+ case DrawGlyph: {\r
+ vgSeti(VG_MATRIX_MODE, VG_MATRIX_GLYPH_USER_TO_SURFACE);\r
+ vgGetMatrix(save_matrix);\r
+ vgSetPaint((VGPaint) command.reference,VG_FILL_PATH);\r
+ vgSetPaint((VGPaint) command.reference,VG_STROKE_PATH);\r
+ vgTranslate(command.x,command.y);\r
+ // vgLoadIdentity();\r
+ // vgTranslate(500.,500.);\r
+ //vgScale(18.f,18.f);\r
+ VGfloat gori[]={0.,0.};\r
+ vgSetfv(VG_GLYPH_ORIGIN,2,gori);\r
+\r
+ unsigned int glyph_index=FT_Get_Char_Index(ft_face,command.target.textchar);\r
+ vgDrawGlyph(vgfont,glyph_index,VG_FILL_PATH,VG_FALSE);\r
+ //vgDrawPath(std_paths[Rectangle],VG_FILL_PATH);\r
+ /* Log::getInstance()->log("OSD", Log::DEBUG, "Draw Glyph %d %c %d %g %g %x",command.reference,command.target.textchar,glyph_index,command.x,command.y,\r
+ vgGetError());*/\r
+ vgLoadMatrix(save_matrix);\r
+ vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE);\r
+ } break;\r
+ case DrawTTchar:{\r
+\r
+ }break;\r
+ }\r
+}\r
+\r
+unsigned int OsdOpenVG::handleTask(OpenVGCommand& command)\r
+{\r
+ switch (command.task){\r
+ case OVGdestroyImageRef: {\r
+ vgDestroyImage((VGImage)command.param1);\r
+ return 0;\r
+ } break;\r
+ case OVGdestroyPaint: {\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "Draw Paint Destroy %d ",command.param1);\r
+ vgDestroyPaint((VGPaint)command.param1);\r
+ return 0;\r
+ } break;\r
+ case OVGcreateImageRGBA: {\r
+ return vgCreateImage(VG_sRGBA_8888,command.param1, command.param2,\r
+ VG_IMAGE_QUALITY_NONANTIALIASED|\r
+ VG_IMAGE_QUALITY_FASTER|VG_IMAGE_QUALITY_BETTER);\r
+ } break;\r
+ case OVGcreateMonoBitmap: {\r
+ VGImage handle=vgCreateImage(VG_A_1,command.param1, command.param2,\r
+ VG_IMAGE_QUALITY_NONANTIALIASED|\r
+ VG_IMAGE_QUALITY_FASTER|VG_IMAGE_QUALITY_BETTER);\r
+ //Log::getInstance()->log("OSD", Log::DEBUG, "Draw create mono %d %d %x %d",command.param1,command.param2,vgGetError(),handle);\r
+ unsigned int buffer_len=(command.param1*command.param2)>>3;\r
+ unsigned char * buffer=(unsigned char*)malloc(buffer_len);\r
+ unsigned char * r_buffer1=buffer;\r
+ const unsigned char * r_buffer2=(const unsigned char *)command.data;\r
+ unsigned char *buffer_end=buffer+buffer_len;\r
+ while (r_buffer1!=buffer_end) {\r
+ unsigned char byte=*r_buffer2;\r
+ *r_buffer1=((byte * 0x0802LU & 0x22110LU) | (byte * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16;\r
+ r_buffer1++;r_buffer2++;\r
+ }\r
+\r
+\r
+ vgImageSubData(handle,buffer,command.param1>>3,\r
+ VG_A_1,0,0,command.param1, command.param2);\r
+ free(buffer);\r
+ // Log::getInstance()->log("OSD", Log::DEBUG, "Draw create mono2 %d %d %x %d",command.param1,command.param2,vgGetError(),handle);\r
+ return handle;\r
+ } break;\r
+ case OVGcreateImageFile: {\r
+ VGImage handle;\r
+ try{\r
+ Image *imagefile=(Image*)command.data;\r
+ Blob imageblob;\r
+ imagefile->write(&imageblob,"RGBA");\r
+\r
+\r
+ handle=vgCreateImage(VG_sXBGR_8888,imagefile->columns(),imagefile->rows(),\r
+ VG_IMAGE_QUALITY_NONANTIALIASED|\r
+ VG_IMAGE_QUALITY_FASTER|VG_IMAGE_QUALITY_BETTER);\r
+ // Log::getInstance()->log("OSD", Log::DEBUG, "Draw create image details %d %d %x mark1",imagefile->columns(),imagefile->rows(),*(unsigned int*)imageblob.data());\r
+ vgImageSubData(handle,imageblob.data(),imagefile->columns()*4,\r
+ VG_sXBGR_8888,0,0,imagefile->columns(),imagefile->rows());\r
+ // Log::getInstance()->log("OSD", Log::DEBUG, "Draw create image details %d %d %x mark2",imagefile->columns(),imagefile->rows(),*(unsigned int*)imageblob.data());\r
+ delete imagefile;\r
+ }catch( Exception &error_ )\r
+ {\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "Libmagick hT: %s",error_.what());\r
+\r
+ return 0;\r
+ }\r
+\r
+ //Log::getInstance()->log("OSD", Log::DEBUG, "Draw create file %d %d %x %d",command.param1,command.param2,vgGetError(),handle);\r
+ return handle;\r
+ } break;\r
+ case OVGcreateColorRef :{\r
+ VGPaint handle;\r
+ handle=vgCreatePaint();\r
+ vgSetParameteri(handle, VG_PAINT_TYPE, VG_PAINT_TYPE_COLOR);\r
+ vgSetColor(handle,command.param1);\r
+ VGuint rgba;\r
+ rgba = vgGetColor((VGPaint)handle);\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "Draw Paint %d %x %x",handle,command.param1,rgba);\r
+ return handle;\r
+ } break;\r
+ case OVGimageUploadLine: {\r
+ vgImageSubData((VGImage)command.param1,command.data,0,VG_sARGB_8888,0,command.param2,command.param3,1);\r
+ return 0;\r
+ } break;\r
+\r
+ }\r
+}\r
+\r
+bool OsdOpenVG::processTasks()\r
+{\r
+ bool worked=false;\r
+ taskmutex.Lock();\r
+ vgmutex.Lock();\r
+ while (vgcommands.size()>0)\r
+ {\r
+ OpenVGCommand &comm=vgcommands.front();\r
+ OpenVGResponse resp;\r
+ resp.result=handleTask(comm);\r
+ resp.id=comm.id;\r
+ if (comm.id) {\r
+ vgresponses.push_back(resp);\r
+ }\r
+ vgcommands.pop_front();\r
+ taskmutex.Unlock();\r
+ vgmutex.Unlock();\r
+ //threadCheckExit();\r
+ pthread_mutex_lock(&vgtaskCondMutex);\r
+ pthread_cond_signal(&vgtaskCond);\r
+ pthread_mutex_unlock(&vgtaskCondMutex);\r
+ taskmutex.Lock();\r
+ vgmutex.Lock();\r
+ worked=true;\r
+ }\r
+ taskmutex.Unlock();\r
+ vgmutex.Unlock();\r
+\r
+ return worked;\r
+}\r
+\r
+bool OsdOpenVG::haveOpenVGResponse(unsigned int id,unsigned int * resp)\r
+{\r
+ taskmutex.Lock();\r
+ if (vgresponses.size()>0)\r
+ {\r
+ deque<OpenVGResponse>::iterator itty=vgresponses.begin();\r
+ while (itty!=vgresponses.end())\r
+ {\r
+ if ((*itty).id==id) {\r
+ *resp=(*itty).result;\r
+ taskmutex.Unlock();\r
+ return true;\r
+ }\r
+ itty++;\r
+ }\r
+ }\r
+ taskmutex.Unlock();\r
+ return false;\r
+}\r
+\r
+\r
+unsigned int OsdOpenVG::putOpenVGCommand(OpenVGCommand& comm,bool wait)\r
+{\r
+ taskmutex.Lock();\r
+ if (wait){\r
+ comm.id=wait_id;\r
+ wait_id++;\r
+ } else {\r
+ comm.id=0; // we are not waiting\r
+ }\r
+ vgcommands.push_back(comm);\r
+ taskmutex.Unlock();\r
+ threadSignal();\r
+ while (wait) {\r
+ unsigned int resp;\r
+ if (!haveOpenVGResponse(comm.id,&resp)) {\r
+ struct timespec target_time;\r
+ clock_gettime(CLOCK_REALTIME,&target_time);\r
+ target_time.tv_nsec+=1000000LL*100;\r
+ if (target_time.tv_nsec>999999999) {\r
+ target_time.tv_nsec-=1000000000L;\r
+ target_time.tv_sec+=1;\r
+ }\r
+ pthread_mutex_lock(&vgtaskCondMutex);\r
+ pthread_cond_timedwait(&vgtaskCond, &vgtaskCondMutex,&target_time);\r
+ pthread_mutex_unlock(&vgtaskCondMutex);\r
+ } else {\r
+ return resp;\r
+ }\r
+ }\r
+ return 0;\r
+}\r
+\r
+void OsdOpenVG::imageUploadLine(ImageIndex index,unsigned int j,unsigned int width,void *data)\r
+{\r
+ vgImageSubData((VGImage)index,data,0,VG_sARGB_8888,0,j,width,1);\r
+\r
+ struct OpenVGCommand comm;\r
+ comm.task=OVGimageUploadLine;\r
+ comm.param1=index;\r
+ comm.param2=j;\r
+ comm.param3=width;\r
+ comm.data=data;\r
+ putOpenVGCommand(comm,true);\r
+}\r
+\r
+void OsdOpenVG::destroyImageRef(ImageIndex index)\r
+{\r
+ struct OpenVGCommand comm;\r
+ comm.task=OVGdestroyImageRef;\r
+ comm.param1=index;\r
+ putOpenVGCommand(comm,false);\r
+}\r
+\r
+ImageIndex OsdOpenVG::createJpeg(const char* fileName, int *width,int *height)\r
+{\r
+ Image* magicimage=NULL;\r
+ bool mem=false;\r
+ struct OpenVGCommand comm;\r
+ comm.task=OVGcreateImageFile;\r
+\r
+ try{\r
+ // Now figure out, if it is a special case\r
+ if (strcmp(fileName,"/vdr.jpg")==0) {\r
+ magicimage=new Image(Blob(vdr_data,vdr_data_end-vdr_data));\r
+ *height=100; // this is faked so that the system does use the old coordinate system\r
+ *width=ceil(190.f*aspect_correction);\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "LoadIm vdr.jpg");\r
+ } else if (strcmp(fileName,"/wallpaperPAL.jpg")==0) {\r
+ magicimage=new Image(Blob(wallpaper_data,wallpaper_data_end-wallpaper_data));\r
+ *width=720; // this is faked so that the system does use the old coordinate system\r
+ *height=576;\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "LoadIm wallpaperPAL.jpg");\r
+ } else {\r
+ magicimage=new Image();\r
+ magicimage->read(fileName);\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "LoadIm file: %s",fileName);\r
+ *width=ceil(magicimage->baseColumns()*aspect_correction); // this is faked so that the system does use the old coordinate system\r
+ *height=magicimage->baseRows();\r
+ }\r
+\r
+ }catch( Exception &error_ )\r
+ {\r
+ Log::getInstance()->log("OSD", Log::DEBUG, "Libmagick: %s",error_.what());\r
+\r
+ return 0;\r
+ }\r
+ comm.data=magicimage;\r
+ return putOpenVGCommand(comm,true);\r
+}\r
+\r
+ImageIndex OsdOpenVG::createMonoBitmap(void *base,int width,int height)\r
+{\r
+ struct OpenVGCommand comm;\r
+ comm.task=OVGcreateMonoBitmap;\r
+ comm.param1=width;\r
+ comm.param2=height;\r
+ comm.data=base;\r
+ return putOpenVGCommand(comm,true);\r
+}\r
+\r
+ImageIndex OsdOpenVG::createImageRGBA(int width,int height)\r
+{\r
+ struct OpenVGCommand comm;\r
+ comm.task=OVGcreateImageRGBA;\r
+ comm.param1=width;\r
+ comm.param2=height;\r
+ return putOpenVGCommand(comm,true);\r
+}\r
+\r
+void OsdOpenVG::destroyStyleRef(unsigned int index)\r
+{\r
+ struct OpenVGCommand comm;\r
+ comm.task=OVGdestroyPaint;\r
+ comm.param1=index;\r
+ putOpenVGCommand(comm,false);\r
+}\r
+\r
+unsigned int OsdOpenVG::createStyleRef(const DrawStyle &c)\r
+{\r
+ unsigned int col=c.rgba();\r
+ struct OpenVGCommand comm;\r
+ comm.task=OVGcreateColorRef;\r
+ comm.param1=col<<8 | (col &0xff000000)>>24;\r
+ comm.data=&c;\r
+ return putOpenVGCommand(comm,true);\r
+}\r
+\r
+unsigned int OsdOpenVG::createColorRef(const Colour &c)\r
+{\r
+ unsigned int col=c.rgba();\r
+ struct OpenVGCommand comm;\r
+ comm.task=OVGcreateColorRef;\r
+ comm.param1=col<<8 | (col &0xff000000)>>24;\r
+ comm.data=&c;\r
+ return putOpenVGCommand(comm,true);\r
+}\r
+\r
+\r
--- /dev/null
+/*\r
+ Copyright 2004-2005 Chris Tallon, 2006,2011-2012 Marten Richter\r
+\r
+ This file is part of VOMP.\r
+\r
+ VOMP is free software; you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation; either version 2 of the License, or\r
+ (at your option) any later version.\r
+\r
+ VOMP is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with VOMP; if not, write to the Free Software\r
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
+*/\r
+\r
+#ifndef OSDOPENVG_H\r
+#define OSDOPENVG_H\r
+\r
+#include <stdio.h>\r
+\r
+\r
+#include <EGL/egl.h>\r
+#include <EGL/eglext.h>\r
+#include <VG/openvg.h>\r
+#include <VG/vgu.h>\r
+\r
+\r
+\r
+#include "osdvector.h"\r
+#include "defines.h"\r
+#include "log.h"\r
+#include "threadp.h"\r
+#include "mutex.h"\r
+#include "videoomx.h"\r
+\r
+#include <deque>\r
+\r
+#include <ft2build.h>\r
+#include FT_FREETYPE_H\r
+\r
+enum OpenVGTask {\r
+ OVGdestroyImageRef,\r
+ OVGdestroyPaint,\r
+ OVGcreateImageRGBA,\r
+ OVGcreateMonoBitmap,\r
+ OVGcreateColorRef,\r
+ OVGimageUploadLine,\r
+ OVGcreateImageFile\r
+};\r
+\r
+struct OpenVGCommand\r
+{\r
+ enum OpenVGTask task;\r
+ const void *data;\r
+ unsigned int param1,param2,param3;\r
+ unsigned int id; //only set an id if you are waiting\r
+};\r
+\r
+struct OpenVGResponse{\r
+ unsigned int id;\r
+ unsigned int result;\r
+};\r
+\r
+\r
+class OsdOpenVG : public OsdVector, public Thread_TYPE\r
+{\r
+ public:\r
+ OsdOpenVG();\r
+ virtual ~OsdOpenVG();\r
+\r
+ int init(void* device);\r
+ int shutdown();\r
+\r
+\r
+ float getFontHeight();\r
+ float getCharWidth(wchar_t c);\r
+ void imageUploadLine(ImageIndex index,unsigned int j,unsigned int width,void *data);\r
+\r
+\r
+protected:\r
+ /*osd vector implementation*/\r
+ void destroyImageRef(ImageIndex index);\r
+ ImageIndex createJpeg(const char* fileName, int *width,int *height);\r
+ ImageIndex createMonoBitmap(void *base,int width,int height);\r
+ ImageIndex createImageRGBA(int width,int height);\r
+ void destroyStyleRef(unsigned int index);\r
+ unsigned int createStyleRef(const DrawStyle &c);\r
+ unsigned int createColorRef(const Colour &c);\r
+\r
+ void drawSetTrans(SurfaceCommands & sc);\r
+ void executeDrawCommand(SVGCommand & command);\r
+\r
+ void initPaths();\r
+ void destroyPaths();\r
+ VGPath std_paths[Point+1];\r
+ long long lastrendertime;\r
+ void InternalRendering();\r
+\r
+\r
+\r
+ Mutex vgmutex;\r
+ Mutex taskmutex;\r
+ pthread_cond_t vgtaskCond;\r
+ pthread_mutex_t vgtaskCondMutex;\r
+ deque<OpenVGCommand> vgcommands;\r
+ deque<OpenVGResponse> vgresponses;\r
+ bool processTasks();\r
+ bool haveOpenVGResponse(unsigned int id,unsigned int * resp);\r
+ unsigned int putOpenVGCommand(OpenVGCommand& comm,bool wait);\r
+ unsigned int handleTask(OpenVGCommand& command);\r
+ unsigned int wait_id;\r
+\r
+ FT_Library ft_library;\r
+ FT_Face ft_face;\r
+ VGFont vgfont;\r
+ int loadFont();\r
+ map<unsigned int,float> font_exp_x;\r
+\r
+\r
+\r
+ void threadMethod();\r
+ void threadPostStopCleanup();\r
+\r
+\r
+ /* BCM specific */\r
+\r
+ uint32_t display_height;\r
+ uint32_t display_width;\r
+ DISPMANX_DISPLAY_HANDLE_T bcm_display;\r
+ DISPMANX_ELEMENT_HANDLE_T bcm_element;\r
+ DISPMANX_ELEMENT_HANDLE_T bcm_background;\r
+ DISPMANX_RESOURCE_HANDLE_T bcm_backres;\r
+\r
+ uint32_t mode;\r
+\r
+\r
+ EGLDisplay egl_display;\r
+ EGLSurface egl_surface;\r
+ EGLContext egl_context;\r
+ EGLConfig egl_ourconfig;\r
+ float font_height;\r
+ float aspect_correction;\r
+\r
+\r
+};\r
+\r
+#endif\r
--- /dev/null
+/*\r
+ Copyright 2012 Marten Richter\r
+\r
+ This file is part of VOMP.\r
+\r
+ VOMP is free software; you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation; either version 2 of the License, or\r
+ (at your option) any later version.\r
+\r
+ VOMP is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with VOMP; if not, write to the Free Software\r
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
+*/\r
+\r
+#include "osdvector.h"\r
+#include "surfacevector.h"\r
+\r
+OsdVector::OsdVector()\r
+{\r
+ setlocale(LC_CTYPE,"C.UTF-8");\r
+}\r
+\r
+OsdVector::~OsdVector()\r
+{\r
+\r
+}\r
+\r
+\r
+int OsdVector::getFD()\r
+{\r
+ return 0;\r
+}\r
+\r
+void OsdVector::screenShot(const char* fileName)\r
+{\r
+ //Do nothing,\r
+}\r
+\r
+Surface * OsdVector::createNewSurface()\r
+{\r
+ return new SurfaceVector(this);\r
+}\r
+\r
+void OsdVector::BeginPainting()\r
+{\r
+ surfaces_mutex.Lock();\r
+}\r
+void OsdVector::EndPainting()\r
+{\r
+ surfaces_mutex.Unlock();\r
+}\r
+\r
+void OsdVector::Blank()\r
+{\r
+ // do nothing? remove this one?\r
+}\r
+\r
+void OsdVector::drawSurfaces()\r
+{\r
+ surfaces_mutex.Lock();\r
+ list<SurfaceCommands*> todraw; //First figure out if a surfaces is below another surface\r
+ list<SurfaceCommands>::iterator itty1=scommands.begin();\r
+ while (itty1!=scommands.end()) {\r
+ list<SurfaceCommands>::iterator itty2=itty1;\r
+ itty2++;\r
+ bool hidden=false;\r
+ while (itty2!=scommands.end()) {\r
+ SurfaceCommands & ref1=*itty1;\r
+ SurfaceCommands & ref2=*itty2;\r
+ if (ref1.x>=ref2.x && ref1.y>=ref2.y\r
+ && (ref1.x+ref1.w) <= (ref2.x+ref2.w)\r
+ && (ref1.y+ref1.h) <= (ref2.y+ref2.h) ) {\r
+ hidden=true;\r
+ break;\r
+ }\r
+ itty2++;\r
+ }\r
+ if (!hidden) { // we are not hidden, perfect\r
+ todraw.push_back(&(*itty1));\r
+ }\r
+ itty1++;\r
+ }\r
+ //Now go through all surfaces and draw them\r
+ list<SurfaceCommands*>::iterator curdraw=todraw.begin();\r
+ while (curdraw!=todraw.end()) {\r
+ drawSetTrans(*(*curdraw));\r
+ list<SVGCommand>::iterator commands=(*(*curdraw)).commands.begin();\r
+ list<SVGCommand>::iterator end=(*(*curdraw)).commands.end();\r
+ while (commands!=end) {\r
+ executeDrawCommand(*commands);\r
+ commands++;\r
+ }\r
+ curdraw++;\r
+ }\r
+\r
+ surfaces_mutex.Unlock();\r
+}\r
+\r
+\r
+void OsdVector::updateOrAddSurface(const SurfaceVector *surf,float x,float y,float height,float width,\r
+ list<SVGCommand>& commands)\r
+{\r
+ surfaces_mutex.Lock();\r
+ //First determine it is already in our system\r
+ list<SurfaceCommands>::iterator itty=scommands.begin();\r
+ while (itty!=scommands.end()) {\r
+ if ((*itty).surf==surf) {\r
+ //decrease the references\r
+ dereferenceSVGCommand((*itty).commands);\r
+ break;\r
+ }\r
+ itty++;\r
+ }\r
+ // if not insert it\r
+ if (itty==scommands.end()) {\r
+ SurfaceCommands new_sc;\r
+ new_sc.surf=surf;\r
+ new_sc.x=x;\r
+ new_sc.y=y;\r
+ new_sc.w=width;\r
+ new_sc.h=height;\r
+ itty=scommands.insert(itty,new_sc);\r
+ }\r
+ // then clear and copy\r
+ (*itty).commands.clear();\r
+ (*itty).commands=commands;\r
+ //increase the references\r
+ list<SVGCommand>::iterator sitty=(*itty).commands.begin();\r
+ while (sitty!=(*itty).commands.end())\r
+ {\r
+ incStyleRef((*sitty).getRef());\r
+ ImageIndex ii=(*sitty).getImageIndex();\r
+ if (ii) incImageRef(ii);\r
+ sitty++;\r
+ }\r
+ cleanupOrphanedRefs();\r
+\r
+ surfaces_mutex.Unlock();\r
+}\r
+\r
+void OsdVector::removeSurface(const SurfaceVector *surf)\r
+{\r
+ surfaces_mutex.Lock();\r
+ //First determine it is already in our system\r
+ list<SurfaceCommands>::iterator itty=scommands.begin();\r
+ while (itty!=scommands.end()) {\r
+ if ((*itty).surf==surf) {\r
+ dereferenceSVGCommand((*itty).commands);\r
+ (*itty).commands.clear();\r
+ scommands.erase(itty);\r
+ break;\r
+ }\r
+ itty++;\r
+ }\r
+ surfaces_mutex.Unlock();\r
+\r
+}\r
+\r
+void OsdVector::dereferenceSVGCommand(list<SVGCommand>& commands )\r
+{\r
+\r
+ list<SVGCommand>::iterator sitty = commands.begin();\r
+ while (sitty != commands.end()) {\r
+ removeStyleRef((*sitty).getRef());\r
+ ImageIndex ii = (*sitty).getImageIndex();\r
+ if (ii) removeImageRef(ii);\r
+ sitty++;\r
+ }\r
+}\r
+\r
+void OsdVector::referenceSVGCommand(list<SVGCommand>& commands )\r
+{\r
+ list<SVGCommand>::iterator sitty=commands.begin();\r
+ while (sitty!=commands.end())\r
+ {\r
+ incStyleRef((*sitty).getRef());\r
+ ImageIndex ii=(*sitty).getImageIndex();\r
+ if (ii) incImageRef(ii);\r
+ sitty++;\r
+ }\r
+}\r
+\r
+void OsdVector::incImageRef(ImageIndex index)\r
+{\r
+ if (images_ref.find(index)==images_ref.end()) {\r
+ images_ref[index]=1;\r
+ } else {\r
+ images_ref[index]++;\r
+ }\r
+}\r
+\r
+void OsdVector::removeImageRef(const ImageIndex ref)\r
+{\r
+ images_ref[ref]--;\r
+}\r
+\r
+void OsdVector::cleanupOrphanedRefs()\r
+{ // Do some garbage collection\r
+ map<ImageIndex,unsigned int>::iterator iitty=images_ref.begin();\r
+ while (iitty!=images_ref.end()) {\r
+ int count=(*iitty).second;\r
+ if (count==0) {\r
+ ImageIndex ref=(*iitty).first;\r
+ images_ref.erase(iitty++);\r
+ destroyImageRef(ref);\r
+ } else ++iitty;\r
+ }\r
+ map<unsigned int,unsigned int>::iterator sitty=styles_ref.begin();\r
+ while (sitty!=styles_ref.end()) {\r
+ int count=(*sitty).second;\r
+ if (count==0) {\r
+ unsigned int ref=(*sitty).first;\r
+ styles_ref.erase(sitty++);\r
+ destroyStyleRef(ref);\r
+ } else ++sitty;\r
+\r
+ }\r
+}\r
+\r
+\r
+unsigned int OsdVector::getImageRef(ImageIndex index)\r
+{\r
+ if (images_ref.find(index)==images_ref.end()) {\r
+ return -1;\r
+ } else {\r
+ return images_ref[index];\r
+ }\r
+}\r
+\r
+void OsdVector::incStyleRef(unsigned int index)\r
+{\r
+ if (styles_ref.find(index)==styles_ref.end()) {\r
+ styles_ref[index]=1;\r
+ } else {\r
+ styles_ref[index]++;\r
+ }\r
+}\r
+\r
+void OsdVector::removeStyleRef(unsigned int index)\r
+{\r
+ styles_ref[index]--;\r
+}\r
+\r
+unsigned int OsdVector::getStyleRef(const DrawStyle &c)\r
+{\r
+ unsigned int style_handle=0;\r
+ if (styles.find(pair<Colour*,unsigned int>((Colour*)&c,c.rgba()))==styles.end())\r
+ {\r
+ style_handle=styles[pair<Colour*,unsigned int>((Colour*)&c,c.rgba())]=createStyleRef(c);\r
+ } else {\r
+ style_handle=styles[pair<Colour*,unsigned int>((Colour*)&c,c.rgba())];\r
+ //Now check if the handle is valid\r
+ if (styles_ref.find(style_handle)==styles_ref.end()) {\r
+ //invalid handle recreate\r
+ style_handle=styles[pair<Colour*,unsigned int>((Colour*)&c,c.rgba())]=createStyleRef(c);\r
+ }\r
+ }\r
+ incStyleRef(style_handle);\r
+ return style_handle;\r
+}\r
+\r
+unsigned int OsdVector::getColorRef(const Colour &c)\r
+{\r
+ unsigned int style_handle=0;\r
+ if (styles.find(pair<Colour*,unsigned int>((Colour*)&c,c.rgba()))==styles.end())\r
+ {\r
+ style_handle=styles[pair<Colour*,unsigned int>((Colour*)&c,c.rgba())]=createColorRef(c);\r
+ } else {\r
+ style_handle=styles[pair<Colour*,unsigned int>((Colour*)&c,c.rgba())];\r
+ if (styles_ref.find(style_handle)==styles_ref.end()) {\r
+ //invalid handle recreate\r
+ style_handle=styles[pair<Colour*,unsigned int>((Colour*)&c,c.rgba())]=createColorRef(c);\r
+ }\r
+ }\r
+ incStyleRef(style_handle);\r
+ return style_handle;\r
+}\r
+\r
+unsigned int OsdVector::getStyleRef(unsigned int index)\r
+{\r
+ if (styles_ref.find(index)==styles_ref.end()) {\r
+ return -1;\r
+ } else {\r
+ return styles_ref[index];\r
+ }\r
+}\r
+\r
+ImageIndex OsdVector::getJpegRef(const char* fileName, int *width,int *height)\r
+{\r
+ ImageIndex image_handle=0;\r
+ if (jpegs.find(fileName)==jpegs.end())\r
+ {\r
+ image_handle=jpegs[fileName]=createJpeg(fileName,width,height);\r
+ } else {\r
+ image_handle=jpegs[fileName];\r
+ *width=0;\r
+ *height=0;\r
+ if (images_ref.find(image_handle)==images_ref.end()) {\r
+ //invalid handle recreate\r
+ image_handle=jpegs[fileName]=createJpeg(fileName,width,height);\r
+ }\r
+ }\r
+ incImageRef(image_handle);\r
+ return image_handle;\r
+}\r
+\r
+ImageIndex OsdVector::getMonoBitmapRef(void *base,int width,int height)\r
+{\r
+ ImageIndex image_handle;\r
+ if (monobitmaps.find(base)==monobitmaps.end())\r
+ {\r
+ image_handle=monobitmaps[base]=createMonoBitmap(base,width,height);\r
+ } else {\r
+ image_handle=monobitmaps[base];\r
+ if (images_ref.find(image_handle)==images_ref.end()) {\r
+ //invalid handle recreate\r
+ image_handle=monobitmaps[base]=createMonoBitmap(base,width,height);\r
+ }\r
+ }\r
+ incImageRef(image_handle);\r
+ return image_handle;\r
+}\r
+\r
+ImageIndex OsdVector::getImageRGBA(int width,int height)\r
+{\r
+ ImageIndex image_handle;\r
+ image_handle=createImageRGBA(width,height);\r
+ incImageRef(image_handle);\r
+ return image_handle;\r
+}\r
--- /dev/null
+/*\r
+ Copyright 2004-2005 Chris Tallon, 2006,2011-2012 Marten Richter\r
+\r
+ This file is part of VOMP.\r
+\r
+ VOMP is free software; you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation; either version 2 of the License, or\r
+ (at your option) any later version.\r
+\r
+ VOMP is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with VOMP; if not, write to the Free Software\r
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
+*/\r
+\r
+#ifndef OSDVECTOR_H\r
+#define OSDVECTOR_H\r
+#include "osd.h"\r
+#include "mutex.h"\r
+#include "colour.h"\r
+#include <list>\r
+#include <map>\r
+#include <string>\r
+\r
+#include "teletextdecodervbiebu.h"\r
+\r
+enum SVGCommandInstr {\r
+ DrawPath,\r
+ DrawGlyph,\r
+ DrawImage,\r
+ DrawTTchar\r
+};\r
+enum PathIndex {\r
+ HorzLine,\r
+ VertLine,\r
+ Rectangle,\r
+ Point\r
+};\r
+\r
+typedef unsigned int ImageIndex;\r
+\r
+class SVGCommand\r
+{\r
+public:\r
+ SVGCommand(float ix, float iy,float iw,float ih,PathIndex path,unsigned int ref)\r
+ {\r
+ instr=DrawPath;\r
+ x=ix;\r
+ y=iy;\r
+ w=iw;\r
+ h=ih;\r
+ target.path_index=path;\r
+ reference=ref;\r
+ };\r
+ SVGCommand(float ix, float iy,float iw,float ih,ImageIndex image_in,unsigned int ref)\r
+ {\r
+ instr=DrawImage;\r
+ x=ix;\r
+ y=iy;\r
+ w=iw;\r
+ h=ih;\r
+ target.image=image_in;\r
+ reference=ref;\r
+ };\r
+ SVGCommand(float ix, float iy,float iw,float ih,unsigned int ttchar_in)\r
+ {\r
+ instr=DrawTTchar;\r
+ x=ix;\r
+ y=iy;\r
+ w=iw;\r
+ h=ih;\r
+ reference=0;\r
+ target.ttchar=ttchar_in;\r
+ };\r
+ SVGCommand(float ix, float iy,wchar_t char_in,unsigned int ref)\r
+ {\r
+ instr=DrawGlyph;\r
+ x=ix;\r
+ y=iy;\r
+ w=0;\r
+ h=0;\r
+ reference=ref;\r
+ target.textchar=char_in;\r
+ };\r
+\r
+ bool Test(float tx,float ty,float tw, float th)\r
+ {\r
+ return (x>=tx) && (y>=ty) && ((x+w)<=(tx+tw)) && ((y+h)<=(ty+th));\r
+ }\r
+ unsigned int getRef(){return reference;};\r
+ ImageIndex getImageIndex() {\r
+ if (instr!=DrawImage) return 0;\r
+ else return target.image;\r
+ };\r
+ SVGCommandInstr instr;\r
+ float x,y,w,h;\r
+ unsigned int reference;\r
+ union {\r
+ PathIndex path_index; //path_index\r
+ wchar_t textchar;\r
+ ImageIndex image;\r
+ unsigned int ttchar;\r
+ } target;\r
+};\r
+\r
+class SurfaceVector;\r
+\r
+struct SurfaceCommands{\r
+ const SurfaceVector* surf;\r
+ list<SVGCommand> commands;\r
+ float x,y,w,h;\r
+};\r
+\r
+\r
+class OsdVector : public Osd\r
+{\r
+ public:\r
+ OsdVector();\r
+ virtual ~OsdVector();\r
+\r
+\r
+ int getFD();\r
+\r
+ void screenShot(const char* fileName);\r
+\r
+ Surface * createNewSurface();\r
+ void BeginPainting();\r
+ void EndPainting();\r
+\r
+ void Blank();\r
+\r
+ void updateOrAddSurface(const SurfaceVector *surf,float x,float y,float height,float width,\r
+ list<SVGCommand>& commands);\r
+ void removeSurface(const SurfaceVector *surf);\r
+\r
+ virtual float getFontHeight()=0;\r
+ virtual float getCharWidth(wchar_t c)=0;\r
+\r
+ virtual ImageIndex getJpegRef(const char* fileName, int *width,int *height);\r
+ virtual ImageIndex getMonoBitmapRef(void *base,int width,int height);\r
+ virtual ImageIndex getImageRGBA(int width,int height);\r
+ virtual void imageUploadLine(ImageIndex index,unsigned int j,unsigned int width,void *data)=0;\r
+ void removeImageRef(const ImageIndex ref);\r
+ unsigned int getColorRef(const Colour &c); //internally this is the same as getStyleRef\r
+ unsigned int getStyleRef(const DrawStyle &c);\r
+ virtual void removeStyleRef(unsigned int ref);\r
+\r
+\r
+ int charSet() {return 2;}; //UTF-8\r
+\r
+\r
+\r
+protected:\r
+\r
+ void incImageRef(ImageIndex index);\r
+ unsigned int getImageRef(ImageIndex index);\r
+ virtual void destroyImageRef(ImageIndex index)=0;\r
+ virtual ImageIndex createJpeg(const char* fileName, int *width,int *height)=0;\r
+ virtual ImageIndex createMonoBitmap(void *base,int width,int height)=0;\r
+ virtual ImageIndex createImageRGBA(int width,int height)=0;\r
+\r
+ map<ImageIndex,unsigned int> images_ref;\r
+ map<void *,ImageIndex> monobitmaps;\r
+ map<string,ImageIndex> jpegs;\r
+\r
+ void incStyleRef(unsigned int index);\r
+ unsigned int getStyleRef(ImageIndex index);\r
+ virtual void destroyStyleRef(unsigned int index)=0;\r
+ map<pair<Colour*,unsigned int>,unsigned int> styles;\r
+ map<unsigned int,unsigned int> styles_ref;\r
+ virtual unsigned int createStyleRef(const DrawStyle &c)=0;\r
+ virtual unsigned int createColorRef(const Colour &c)=0;\r
+\r
+ void dereferenceSVGCommand(list<SVGCommand>& commands );\r
+ void referenceSVGCommand(list<SVGCommand>& commands );\r
+ void cleanupOrphanedRefs();\r
+\r
+\r
+\r
+ virtual void drawSetTrans(SurfaceCommands & sc)=0;\r
+ virtual void executeDrawCommand(SVGCommand & command)=0;\r
+\r
+\r
+\r
+\r
+ list<SurfaceCommands> scommands;\r
+\r
+ Mutex surfaces_mutex;\r
+\r
+ void drawSurfaces();\r
+};\r
+\r
+\r
+\r
+\r
+#endif\r
Any information posted on these pages is freely available to anybody. All
source code published here is protected by the GNU general public licence."
+Note:
+VDR Logo (c) by Jan Grell
+Licensed under Creative Commons Licence.
+
------------------------------------------------------------------
wallpaper.jpg is actually blue-bend.jpg from the KDE wallpapers.
else return drawText(text, x, y, c);\r
}\r
\r
-int Surface::getCharWidth(char c)\r
+float Surface::getCharWidth(wchar_t c)\r
{\r
- return font->width[(unsigned char) c];\r
+ return (float)font->width[(unsigned char) c];\r
}\r
\r
int Surface::getFontHeight()\r
return font->spacing;\r
}\r
\r
+ wchar_t Surface::getWChar(const char* str, unsigned int *length)\r
+ {\r
+ *length=1;\r
+ return *str;\r
+ }\r
+\r
//Moved from Teletext view in order to allow device depend optimizations\r
\r
Colour Surface::enumTeletextColorToCoulour(enumTeletextColor ttcol)\r
endFastDraw();\r
}\r
\r
-void Surface::drawPoint(int x, int y, Colour& c, bool fastdraw)\r
+void Surface::drawPoint(int x, int y, DrawStyle& c, bool fastdraw)\r
{\r
drawPixel(x,y,c,fastdraw);\r
}\r
\r
static Surface* getScreen();\r
virtual int getFontHeight();\r
- virtual int getCharWidth(char c);\r
+ virtual float getCharWidth(wchar_t c);\r
+ virtual wchar_t getWChar(const char* str, unsigned int *length);\r
\r
virtual int drawText(const char* text, int x, int y, const DrawStyle& c);\r
virtual int drawText(const char* text, int x, int y, int width, const DrawStyle& c);\r
virtual void drawHorzLine(int x1, int x2, int y, const DrawStyle& c)=0;\r
virtual void drawVertLine(int x, int y1, int y2, const DrawStyle& c)=0;\r
virtual void drawBitmap(int x, int y, const Bitmap& bm)=0;\r
- virtual void drawPoint(int x, int y, Colour& c, bool fastdraw=false); // This draws a point, must not be a pixel\r
+ virtual void drawPoint(int x, int y, DrawStyle& c, bool fastdraw=false); // This draws a point, must not be a pixel\r
virtual void drawMonoBitmap(UCHAR* base, int dx, int dy, unsigned int height,unsigned int width, Colour& nextColour);\r
virtual int updateToScreen(int sx, int sy, int w, int h, int dx, int dy)=0;\r
virtual void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b)=0;\r
{\r
public:\r
SurfaceDirectFB(int id = 0);\r
- ~SurfaceDirectFB();\r
+ virtual ~SurfaceDirectFB();\r
\r
int create(UINT width, UINT height);\r
void display();\r
{\r
public:\r
SurfaceMVP(int id = 0);\r
- ~SurfaceMVP();\r
+ virtual ~SurfaceMVP();\r
\r
int create(UINT width, UINT height);\r
void display();\r
--- /dev/null
+/*\r
+ Copyright 2012 Marten Richter\r
+\r
+ This file is part of VOMP.\r
+\r
+ VOMP is free software; you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation; either version 2 of the License, or\r
+ (at your option) any later version.\r
+\r
+ VOMP is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with VOMP; if not, write to the Free Software\r
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
+*/\r
+\r
+#include "surfacevector.h"\r
+#include "bitmap.h"\r
+#include <wchar.h>\r
+#include <stdlib.h>\r
+\r
+SurfaceVector::SurfaceVector(OsdVector* vosd)\r
+{\r
+\r
+ osd=vosd;\r
+}\r
+\r
+SurfaceVector::~SurfaceVector()\r
+{\r
+ osd->removeSurface(this);\r
+ list<SVGCommand>::iterator itty=commands.begin();\r
+ while (itty!=commands.end())\r
+ {\r
+ osd->removeStyleRef((*itty).getRef()); // We remove the Style reference, so that osd can free stuff\r
+ ImageIndex ii=(*itty).getImageIndex();\r
+ if (ii) osd->removeImageRef(ii);\r
+ itty++;\r
+ }\r
+}\r
+\r
+\r
+int SurfaceVector::getFontHeight()\r
+{\r
+ return osd->getFontHeight();\r
+}\r
+\r
+float SurfaceVector::getCharWidth(wchar_t c)\r
+{\r
+ return osd->getCharWidth(c);\r
+}\r
+\r
+wchar_t SurfaceVector::getWChar(const char* str, unsigned int *length)\r
+{\r
+ int mlength=0;\r
+ int max_length=4;\r
+ wchar_t tempo[1];\r
+ size_t num_bytes=1;\r
+ if (str[0]=='\0') {\r
+ *length=1;\r
+ return '\0';\r
+ } else if (str[1]=='\0'){\r
+ max_length=2;\r
+ } else if (str[2]=='\0'){\r
+ max_length=3;\r
+ }\r
+ mbstate_t state;\r
+ memset((void*)&state,0,sizeof(state));\r
+ num_bytes=mbrtowc(tempo, str, max_length, &state);\r
+ if (num_bytes!=((size_t) -1) && num_bytes!=((size_t) -2))\r
+ {\r
+ *length=num_bytes;\r
+ return *tempo;\r
+ }\r
+ *length=1;\r
+ return '?';\r
+}\r
+\r
+\r
+int SurfaceVector::drawText(const char* text, int x, int y, const DrawStyle& c){\r
+ return drawText(text, x, y, 0, c);\r
+}\r
+\r
+int SurfaceVector::drawText(const char* text, int x, int y, int width, const DrawStyle& c)\r
+{\r
+ float shift=0.;\r
+ const char *run=text;\r
+ mbstate_t state;\r
+ wchar_t tempo[1];\r
+ size_t num_bytes=1;\r
+ size_t length=strlen(text);\r
+ memset((void*)&state,0,sizeof(state));\r
+ command_mutex.Lock();\r
+ num_bytes=mbrtowc(tempo, run, length, &state);\r
+ while (num_bytes!=((size_t) -1) && num_bytes!=((size_t) -2) && length>0)\r
+ {\r
+ unsigned int ref=osd->getStyleRef(c);\r
+ commands.push_back(SVGCommand(x+shift,y,*tempo,ref));\r
+ shift+=osd->getCharWidth(*tempo);\r
+ length -= num_bytes;\r
+ run += num_bytes;\r
+ if (shift>width && width >0) {\r
+ command_mutex.Unlock();\r
+ return 1;\r
+ }\r
+ num_bytes=mbrtowc(tempo, run, length, &state);\r
+ }\r
+ command_mutex.Unlock();\r
+ return 1;\r
+\r
+}\r
+int SurfaceVector::drawTextRJ(const char* text, int x, int y, const DrawStyle& c)\r
+{\r
+ float shift=0.;\r
+ const char *run=text;\r
+ mbstate_t state;\r
+ wchar_t tempo[1];\r
+ size_t num_bytes=1;\r
+ size_t length=strlen(text);\r
+ memset((void*)&state,0,sizeof(state));\r
+\r
+ num_bytes=mbrtowc(tempo, run, length, &state);\r
+ while (num_bytes!=((size_t) -1) && num_bytes!=((size_t) -2) && length>0)\r
+ {\r
+ shift+=osd->getCharWidth(*tempo);\r
+ length -= num_bytes;\r
+ run += num_bytes;\r
+ num_bytes=mbrtowc(tempo, run, length, &state);\r
+ }\r
+ return drawText(text, x-shift, y, c);\r
+}\r
+\r
+int SurfaceVector::drawTextCentre(const char* text, int x, int y, const DrawStyle& c)\r
+{\r
+ float shift=0;\r
+ const char *run=text;\r
+ mbstate_t state;\r
+ wchar_t tempo[1];\r
+ size_t num_bytes=1;\r
+ size_t length=strlen(text);\r
+ memset((void*)&state,0,sizeof(state));\r
+\r
+ num_bytes=mbrtowc(tempo, run, length, &state);\r
+ while (num_bytes!=((size_t) -1) && num_bytes!=((size_t) -2) && length>0)\r
+ {\r
+ shift+=osd->getCharWidth(*tempo);\r
+ length -= num_bytes;\r
+ run += num_bytes;\r
+ num_bytes=mbrtowc(tempo, run, length, &state);\r
+ }\r
+ return drawText(text, x-shift/2., y, c);\r
+}\r
+\r
+void SurfaceVector::drawJpeg(const char *fileName,int x, int y,int *width, int *height)\r
+{\r
+ command_mutex.Lock();\r
+ ImageIndex image=osd->getJpegRef(fileName,width,height);\r
+ commands.push_back(SVGCommand(x,y,*height,*width,image,0));\r
+ command_mutex.Unlock();\r
+}\r
+\r
+int SurfaceVector::create(UINT width, UINT height)\r
+{\r
+ sheight=height;\r
+ swidth=width;\r
+ return 1;\r
+}\r
+void SurfaceVector::display()\r
+{\r
+ //nothing this is really mvp specific\r
+}\r
+\r
+int SurfaceVector::fillblt(int x, int y, int width, int height, const DrawStyle& c)\r
+{\r
+ command_mutex.Lock();\r
+ removeCommands(x,y,width,height); // remove commands below the box\r
+ unsigned int ref=osd->getStyleRef(c);\r
+ commands.push_back(SVGCommand(x,y,width,height,Rectangle,ref));\r
+ command_mutex.Unlock();\r
+ return 1;\r
+\r
+}\r
+void SurfaceVector::drawHorzLine(int x1, int x2, int y, const DrawStyle& c)\r
+{\r
+ command_mutex.Lock();\r
+ unsigned int ref=osd->getStyleRef(c);\r
+ commands.push_back(SVGCommand(x1,y,x2-x1,1,HorzLine,ref));\r
+ command_mutex.Unlock();\r
+}\r
+\r
+void SurfaceVector::drawVertLine(int x, int y1, int y2, const DrawStyle& c){\r
+ command_mutex.Lock();\r
+ unsigned int ref=osd->getStyleRef(c);\r
+ commands.push_back(SVGCommand(x,y1,1,y2-y1,VertLine,ref));\r
+ command_mutex.Unlock();\r
+}\r
+\r
+void SurfaceVector::drawBitmap(int x, int y, const Bitmap& bm)\r
+{\r
+ //this is complicated\r
+ command_mutex.Lock();\r
+ ImageIndex image=osd->getImageRGBA(bm.getWidth(),bm.getHeight());\r
+ unsigned int * data=(unsigned int*)malloc(sizeof(unsigned int)*bm.getWidth());\r
+ for (UINT j = 0; j < bm.getHeight(); ++j){\r
+ for (UINT i = 0; i < bm.getWidth(); ++i)\r
+ {\r
+ data[i]=bm.getColour(i,j);\r
+ }\r
+ osd->imageUploadLine(image,j,bm.getWidth(),data);\r
+ }\r
+ free(data);\r
+ commands.push_back(SVGCommand(x,y,bm.getHeight(),bm.getWidth(),image,0));\r
+ command_mutex.Unlock();\r
+}\r
+\r
+void SurfaceVector::drawPoint(int x, int y, DrawStyle& c, bool fastdraw){\r
+ if (!fastdraw) command_mutex.Lock();\r
+ unsigned int ref=osd->getStyleRef(c);\r
+ commands.push_back(SVGCommand(x,y,1,1,Point,ref));\r
+ if (!fastdraw) command_mutex.Unlock();\r
+}\r
+void SurfaceVector::drawMonoBitmap(UCHAR* base, int dx, int dy, unsigned int height,unsigned int width, Colour& nextColour)\r
+{\r
+ command_mutex.Lock();\r
+ ImageIndex image=osd->getMonoBitmapRef(base,width,height);\r
+ unsigned int ref=osd->getColorRef(nextColour);\r
+ commands.push_back(SVGCommand(dx,dy,height,width,image,ref));\r
+ command_mutex.Unlock();\r
+}\r
+\r
+\r
+int SurfaceVector::removeCommands(float x,float y,float width,float height)\r
+{\r
+ // we iterate through all old commands in order to remove commands hidden by this rectangle\r
+ list<SVGCommand>::iterator itty=commands.begin();\r
+ while (itty!=commands.end())\r
+ {\r
+ if ((*itty).Test(x,y,width,height) ) {\r
+ osd->removeStyleRef((*itty).getRef()); // We remove the Style reference, so that osd can free stuff\r
+ ImageIndex ii=(*itty).getImageIndex();\r
+ if (ii) osd->removeImageRef(ii);\r
+ itty=commands.erase(itty);\r
+ } else {\r
+ itty++;\r
+ }\r
+ }\r
+ return 1;\r
+\r
+}\r
+\r
+int SurfaceVector::updateToScreen(int sx, int sy, int w, int h, int dx, int dy)\r
+{\r
+ // ok this method really works in a pixel oriented way\r
+ command_mutex.Lock();\r
+ osd->updateOrAddSurface(this,dx-sx,dy-sy,swidth,sheight,commands);\r
+ command_mutex.Unlock();\r
+ return 1;\r
+}\r
+\r
+\r
+/* This is for systems which need a locking of the drawing surface to speed up drawing */\r
+void SurfaceVector::startFastDraw() {\r
+ command_mutex.Lock();\r
+}\r
+void SurfaceVector::endFastDraw() {\r
+ command_mutex.Unlock();\r
+}\r
+\r
+\r
+void SurfaceVector::drawTTChar(int ox, int oy,int x, int y, cTeletextChar c)\r
+{\r
+ command_mutex.Lock();\r
+ commands.push_back(SVGCommand(ox,oy,x,y,c.getInternal()));\r
+ command_mutex.Unlock();\r
+}\r
--- /dev/null
+/*\r
+ Copyright 2012 Marten Richter\r
+\r
+ This file is part of VOMP.\r
+\r
+ VOMP is free software; you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation; either version 2 of the License, or\r
+ (at your option) any later version.\r
+\r
+ VOMP is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with VOMP; if not, write to the Free Software\r
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
+*/\r
+\r
+#ifndef SURFACEVECTOR_H\r
+#define SURFACEVECTOR_H\r
+\r
+#include "surface.h"\r
+#include "osdvector.h"\r
+\r
+#include <list>\r
+\r
+\r
+class SurfaceVector : public Surface\r
+{\r
+ public:\r
+ SurfaceVector(OsdVector* vosd);\r
+ virtual ~SurfaceVector();\r
+\r
+ int getFontHeight();\r
+ float getCharWidth(wchar_t c);\r
+ wchar_t getWChar(const char* str, unsigned int *length);\r
+\r
+ int drawText(const char* text, int x, int y, const DrawStyle& c);\r
+ int drawText(const char* text, int x, int y, int width, const DrawStyle& c);\r
+ int drawTextRJ(const char* text, int x, int y, const DrawStyle& c);\r
+ int drawTextCentre(const char* text, int x, int y, const DrawStyle& c);\r
+\r
+ void drawJpeg(const char *fileName,int x, int y,int *width, int *height);\r
+\r
+ int create(UINT width, UINT height);\r
+ void display();\r
+\r
+ int fillblt(int x, int y, int width, int height, const DrawStyle& c);\r
+ void drawHorzLine(int x1, int x2, int y, const DrawStyle& c);\r
+ void drawVertLine(int x, int y1, int y2, const DrawStyle& c);\r
+ void drawBitmap(int x, int y, const Bitmap& bm);\r
+ void drawPoint(int x, int y, DrawStyle& c, bool fastdraw=false); // This draws a point, must not be a pixel\r
+ void drawMonoBitmap(UCHAR* base, int dx, int dy, unsigned int height,unsigned int width, Colour& nextColour);\r
+ int updateToScreen(int sx, int sy, int w, int h, int dx, int dy);\r
+\r
+\r
+ /* This is for system which need a locking of the drawing surface to speed up drawing */\r
+ void startFastDraw();\r
+ void endFastDraw() ;\r
+\r
+\r
+ void drawTTChar(int ox, int oy,int x, int y, cTeletextChar c);\r
+\r
+ void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b){};\r
+ void screenShot(const char* fileName){};\r
+\r
+ protected:\r
+\r
+\r
+ int removeCommands(float x,float y,float width,float height);\r
+\r
+ list<SVGCommand> commands;\r
+ int swidth, sheight;\r
+ Mutex command_mutex;\r
+ OsdVector* osd;\r
+\r
+ void drawPixel(int x, int y, unsigned int c, bool fastdraw){}; // these are not supported!\r
+ void drawPixel(int x, int y, Colour& c, bool fastdraw){};\r
+\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+#endif\r
{ c=(Blink)?(c|BLINK):(c&~BLINK); }
inline cTeletextChar ToBlink(bool Blink)
{ return cTeletextChar((Blink)?(c|BLINK):(c&~BLINK)); }
+
+ inline void setInternal(unsigned int cc) {c=cc;};
+ inline unsigned int getInternal() {return c;};
bool operator==(cTeletextChar &chr) { return c==chr.c; }
bool operator!=(cTeletextChar &chr) { return c!=chr.c; }
char showing[200];
sprintf(showing, tr("%i to %i of %i"), topOption, sl.getBottomOption(), sl.getNumOptions());
- rectangle(220, 385, 220+160, 385+25, DrawStyle::VIEWBACKGROUND);
+ rectangle(220, 385,160, 25, DrawStyle::VIEWBACKGROUND);
drawText(showing, 220, 385, DrawStyle::LIGHTTEXT);
}
rectangle(x, y, w, h, bg);\r
char* tt = new char[strlen(event->title) + 1];\r
strcpy (tt, event->title);\r
- int textWidth = 0;\r
- for (UINT textPos = 0; textPos < strlen(tt); textPos++)\r
+ float textWidth = 0;\r
+ unsigned int cur_length=1;\r
+ unsigned int text_max=strlen(tt);\r
+ UINT textPos;\r
+ for (textPos = 0; textPos <text_max; textPos+=cur_length)\r
{\r
- int thisCharWidth = charWidth(tt[textPos]);\r
+ wchar_t cur_char=getWChar(tt+textPos,&cur_length);\r
+ float thisCharWidth = charWidth(cur_char);\r
if (textWidth + thisCharWidth > w) // text will not fit in cell\r
{\r
- textWidth = textPos;\r
break;\r
}\r
textWidth += thisCharWidth;\r
}\r
- char* tT = new char[textWidth];\r
- if(textWidth > 1)\r
+ char* tT = new char[textPos+1];\r
+ if(textPos > 0)\r
{\r
- strncpy(tT, tt, textWidth - 1);\r
- tT[textWidth - 1] = '\0';\r
+ strncpy(tT, tt, textPos );\r
+ tT[textPos ] = '\0';\r
surface->drawText(tT, x+2, y, fg);\r
}\r
delete tT;\r
#include "audioomx.h"
#include "mtdraspberry.h"
#include "demuxer.h"
-#include "osdopengl.h"
#include "vdr.h"
#include "woptionpane.h"
+#include "osdopenvg.h"
+
// temp
#include "log.h"
fx = x[0] = 50;
fy = y[0] = 50;
- Colour black=(Colour)DrawStyle::BLACK;
- Colour light=(Colour)DrawStyle::SELECTHIGHLIGHT;
+ DrawStyle &black=DrawStyle::BLACK;
+ DrawStyle &light=DrawStyle::SELECTHIGHLIGHT;
while(1)
{
public:
WSymbol();
+ //TODO add vector based Symbols
void draw();
UCHAR nextSymbol;
Colour nextColour;
{
public:
WTabBar();
- ~WTabBar();
+ virtual ~WTabBar();
void addTab(const char* name, Boxx* boxx);
int handleCommand(int command);
bool mouseMove(int x, int y) ;