mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 18:25:28 +00:00
2005-05-06 John Luke <john.luke@gmail.com>
* pango/Makefile.am: add Matrix.custom * pango/Matrix.custom: add Pango.Matrix.Identity field which is the equivalent of PANGO_MATRIX_INIT * sample/GtkDemo/DemoRotatedText.cs: use Pango.Matrix.Identity * doc/en/Pango/Matrix.xml: add docs for Pango.Matrix.Identity svn path=/trunk/gtk-sharp/; revision=44181
This commit is contained in:
parent
dcae7c2869
commit
ab20101e76
|
@ -1,3 +1,11 @@
|
|||
2005-05-06 John Luke <john.luke@gmail.com>
|
||||
|
||||
* pango/Makefile.am: add Matrix.custom
|
||||
* pango/Matrix.custom: add Pango.Matrix.Identity field
|
||||
which is the equivalent of PANGO_MATRIX_INIT
|
||||
* sample/GtkDemo/DemoRotatedText.cs: use Pango.Matrix.Identity
|
||||
* doc/en/Pango/Matrix.xml: add docs for Pango.Matrix.Identity
|
||||
|
||||
2005-05-06 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* configure.in.in : always enable debug build in maintainer_mode.
|
||||
|
|
|
@ -227,5 +227,18 @@
|
|||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Identity">
|
||||
<MemberSignature Language="C#" Value="public static Pango.Matrix Identity;" />
|
||||
<MemberType>Field</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>Pango.Matrix</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Can be used to initialize a PangoMatrix to the identity transform.</summary>
|
||||
<remarks>This is the equivalent of PANGO_MATRIX_INIT in C.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
||||
</Type>
|
||||
|
|
|
@ -38,6 +38,7 @@ customs = \
|
|||
GlyphItem.custom \
|
||||
Layout.custom \
|
||||
LayoutLine.custom \
|
||||
Matrix.custom \
|
||||
TabArray.custom
|
||||
|
||||
add_dist = makefile.win32
|
||||
|
|
34
pango/Matrix.custom
Normal file
34
pango/Matrix.custom
Normal file
|
@ -0,0 +1,34 @@
|
|||
// Pango.Matrix.custom - Pango Matrix class customizations
|
||||
//
|
||||
// Authors: John Luke <john.luke@gmail.com>
|
||||
//
|
||||
// Copyright (c) 2005 John Luke.
|
||||
//
|
||||
// This code is inserted after the automatically generated code.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
// Public License as published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this program; if not, write to the
|
||||
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
// Boston, MA 02111-1307, USA.
|
||||
|
||||
static Matrix ()
|
||||
{
|
||||
Identity.Xx = 1.0;
|
||||
Identity.Xy = 0.0;
|
||||
Identity.Yx = 0.0;
|
||||
Identity.Yy = 1.0;
|
||||
Identity.X0 = 0.0;
|
||||
Identity.Y0 = 0.0;
|
||||
}
|
||||
|
||||
public static Matrix Identity;
|
||||
|
|
@ -44,14 +44,7 @@ namespace GtkDemo
|
|||
// the centered square where we draw are [-RADIUS, RADIUS], [-RADIUS, RADIUS]
|
||||
// We first center, then change the scale
|
||||
deviceRadius = Math.Min (width, height) / 2;
|
||||
// #define PANGO_MATRIX_INIT { 1., 0., 0., 1., 0., 0. }
|
||||
Matrix matrix = new Matrix ();
|
||||
matrix.Xx = 1.0;
|
||||
matrix.Xy = 0.0;
|
||||
matrix.Yx = 0.0;
|
||||
matrix.Yy = 1.0;
|
||||
matrix.X0 = 0.0;
|
||||
matrix.Y0 = 0.0;
|
||||
Matrix matrix = Pango.Matrix.Identity;
|
||||
matrix.Translate (deviceRadius + (width - 2 * deviceRadius) / 2, deviceRadius + (height - 2 * deviceRadius) / 2);
|
||||
matrix.Scale (deviceRadius / RADIUS, deviceRadius / RADIUS);
|
||||
|
||||
|
|
Loading…
Reference in a new issue