bug 633342 - get rid of windows newlines in cairo files. r=bas a=joe

This commit is contained in:
Jonathan Kew 2011-02-15 20:55:01 +00:00
parent 2b4d3f034f
commit c821b99718
7 changed files with 5735 additions and 5735 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,37 +1,37 @@
// We store vertex coordinates and the quad shape in a constant buffer, this is
// easy to update and allows us to use a single call to set the x, y, w, h of
// the quad.
// The QuadDesc and TexCoords both work as follows:
// The x component is the quad left point, the y component is the top point
// the z component is the width, and the w component is the height. The quad
// are specified in viewport coordinates, i.e. { -1.0f, 1.0f, 2.0f, -2.0f }
// would cover the entire viewport (which runs from <-1.0f, 1.0f> left to right
// and <-1.0f, 1.0f> -bottom- to top. The TexCoords desc is specified in texture
// space <0, 1.0f> left to right and top to bottom. The input vertices of the
// shader stage always form a rectangle from {0, 0} - {1, 1}
cbuffer cb0
{
float4 QuadDesc;
float4 TexCoords;
float4 TextColor;
}
struct VS_OUTPUT
{
float4 Position : SV_Position;
float2 TexCoord : TEXCOORD0;
};
struct PS_OUTPUT
{
float4 color;
float4 alpha;
};
Texture2D tex;
BlendState bTextBlend
{
// We store vertex coordinates and the quad shape in a constant buffer, this is
// easy to update and allows us to use a single call to set the x, y, w, h of
// the quad.
// The QuadDesc and TexCoords both work as follows:
// The x component is the quad left point, the y component is the top point
// the z component is the width, and the w component is the height. The quad
// are specified in viewport coordinates, i.e. { -1.0f, 1.0f, 2.0f, -2.0f }
// would cover the entire viewport (which runs from <-1.0f, 1.0f> left to right
// and <-1.0f, 1.0f> -bottom- to top. The TexCoords desc is specified in texture
// space <0, 1.0f> left to right and top to bottom. The input vertices of the
// shader stage always form a rectangle from {0, 0} - {1, 1}
cbuffer cb0
{
float4 QuadDesc;
float4 TexCoords;
float4 TextColor;
}
struct VS_OUTPUT
{
float4 Position : SV_Position;
float2 TexCoord : TEXCOORD0;
};
struct PS_OUTPUT
{
float4 color;
float4 alpha;
};
Texture2D tex;
BlendState bTextBlend
{
AlphaToCoverageEnable = FALSE;
BlendEnable[0] = TRUE;
SrcBlend = Src1_Color;
@ -40,57 +40,57 @@ BlendState bTextBlend
SrcBlendAlpha = Src1_Alpha;
DestBlendAlpha = Inv_Src1_Alpha;
BlendOpAlpha = Add;
RenderTargetWriteMask[0] = 0x0F; // All
};
sampler sSampler = sampler_state {
Texture = tex;
AddressU = Clamp;
AddressV = Clamp;
};
VS_OUTPUT SampleTextureVS(float3 pos : POSITION)
{
VS_OUTPUT Output;
Output.Position.w = 1.0f;
Output.Position.x = pos.x * QuadDesc.z + QuadDesc.x;
Output.Position.y = pos.y * QuadDesc.w + QuadDesc.y;
Output.Position.z = 0;
Output.TexCoord.x = pos.x * TexCoords.z + TexCoords.x;
Output.TexCoord.y = pos.y * TexCoords.w + TexCoords.y;
return Output;
}
float4 SampleTexturePS( VS_OUTPUT In) : SV_Target
{
return tex.Sample(sSampler, In.TexCoord);
};
PS_OUTPUT SampleTextTexturePS( VS_OUTPUT In) : SV_Target
{
PS_OUTPUT output;
output.color = TextColor;
output.alpha.rgba = tex.Sample(sSampler, In.TexCoord).bgrg * TextColor.a;
return output;
};
technique10 SampleTexture
{
pass P0
{
SetVertexShader(CompileShader(vs_4_0_level_9_3, SampleTextureVS()));
SetGeometryShader(NULL);
SetPixelShader(CompileShader(ps_4_0_level_9_3, SampleTexturePS()));
}
}
technique10 SampleTextTexture
{
pass P0
{
SetBlendState(bTextBlend, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF );
SetVertexShader(CompileShader(vs_4_0_level_9_3, SampleTextureVS()));
SetGeometryShader(NULL);
SetPixelShader(CompileShader(ps_4_0_level_9_3, SampleTextTexturePS()));
}
}
RenderTargetWriteMask[0] = 0x0F; // All
};
sampler sSampler = sampler_state {
Texture = tex;
AddressU = Clamp;
AddressV = Clamp;
};
VS_OUTPUT SampleTextureVS(float3 pos : POSITION)
{
VS_OUTPUT Output;
Output.Position.w = 1.0f;
Output.Position.x = pos.x * QuadDesc.z + QuadDesc.x;
Output.Position.y = pos.y * QuadDesc.w + QuadDesc.y;
Output.Position.z = 0;
Output.TexCoord.x = pos.x * TexCoords.z + TexCoords.x;
Output.TexCoord.y = pos.y * TexCoords.w + TexCoords.y;
return Output;
}
float4 SampleTexturePS( VS_OUTPUT In) : SV_Target
{
return tex.Sample(sSampler, In.TexCoord);
};
PS_OUTPUT SampleTextTexturePS( VS_OUTPUT In) : SV_Target
{
PS_OUTPUT output;
output.color = TextColor;
output.alpha.rgba = tex.Sample(sSampler, In.TexCoord).bgrg * TextColor.a;
return output;
};
technique10 SampleTexture
{
pass P0
{
SetVertexShader(CompileShader(vs_4_0_level_9_3, SampleTextureVS()));
SetGeometryShader(NULL);
SetPixelShader(CompileShader(ps_4_0_level_9_3, SampleTexturePS()));
}
}
technique10 SampleTextTexture
{
pass P0
{
SetBlendState(bTextBlend, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF );
SetVertexShader(CompileShader(vs_4_0_level_9_3, SampleTextureVS()));
SetGeometryShader(NULL);
SetPixelShader(CompileShader(ps_4_0_level_9_3, SampleTextTexturePS()));
}
}

View File

@ -1,170 +1,170 @@
/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
/* Cairo - a vector graphics library with display and print output
*
* Copyright © 2010 Mozilla Foundation
*
* This library is free software; you can redistribute it and/or
* modify it either under the terms of the GNU Lesser General Public
* License version 2.1 as published by the Free Software Foundation
* (the "LGPL") or, at your option, under the terms of the Mozilla
* Public License Version 1.1 (the "MPL"). If you do not alter this
* notice, a recipient may use your version of this file under either
* the MPL or the LGPL.
*
* You should have received a copy of the LGPL along with this library
* in the file COPYING-LGPL-2.1; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* You should have received a copy of the MPL along with this library
* in the file COPYING-MPL-1.1
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
* OF ANY KIND, either express or implied. See the LGPL or the MPL for
* the specific language governing rights and limitations.
*
* The Original Code is the cairo graphics library.
*
* The Initial Developer of the Original Code is the Mozilla Foundation
*
* Contributor(s):
* Bas Schouten <bschouten@mozilla.com>
*/
#ifndef CAIRO_D2D_PRIVATE_H
#define CAIRO_D2D_PRIVATE_H
#ifdef CAIRO_HAS_D2D_SURFACE
#include <windows.h>
#include <d2d1.h>
#include <d3d10.h>
#include <dxgi.h>
extern "C" {
#include "cairoint.h"
#include "cairo-surface-clipper-private.h"
}
#include "cairo-win32-refptr.h"
#include "cairo-d2d-private-fx.h"
#include "cairo-win32.h"
/* describes the type of the currently applied clip so that we can pop it */
struct d2d_clip;
#define MAX_OPERATORS CAIRO_OPERATOR_HSL_LUMINOSITY + 1
struct _cairo_d2d_device
{
cairo_device_t base;
HMODULE mD3D10_1;
RefPtr<ID3D10Device1> mD3D10Device;
RefPtr<ID3D10Effect> mSampleEffect;
RefPtr<ID3D10InputLayout> mInputLayout;
RefPtr<ID3D10Buffer> mQuadBuffer;
RefPtr<ID3D10RasterizerState> mRasterizerState;
RefPtr<ID3D10BlendState> mBlendStates[MAX_OPERATORS];
/** Texture used for manual glyph rendering */
RefPtr<ID3D10Texture2D> mTextTexture;
RefPtr<ID3D10ShaderResourceView> mTextTextureView;
int mVRAMUsage;
};
const unsigned int TEXT_TEXTURE_WIDTH = 2048;
const unsigned int TEXT_TEXTURE_HEIGHT = 512;
typedef struct _cairo_d2d_device cairo_d2d_device_t;
struct _cairo_d2d_surface {
_cairo_d2d_surface() : d2d_clip(NULL), clipping(false), isDrawing(false),
textRenderingInit(true)
{
_cairo_clip_init (&this->clip);
}
cairo_surface_t base;
/* Device used by this surface
* NOTE: In upstream cairo this is in the surface base class */
cairo_d2d_device_t *device;
/** Render target of the texture we render to */
RefPtr<ID2D1RenderTarget> rt;
/** Surface containing our backstore */
RefPtr<ID3D10Resource> surface;
/**
* Surface used to temporarily store our surface if a bitmap isn't available
* straight from our render target surface.
*/
RefPtr<ID3D10Texture2D> bufferTexture;
/** Backbuffer surface hwndrt renders to (NULL if not a window surface) */
RefPtr<IDXGISurface> backBuf;
/** Bitmap shared with texture and rendered to by rt */
RefPtr<ID2D1Bitmap> surfaceBitmap;
/** Swap chain holding our backbuffer (NULL if not a window surface) */
RefPtr<IDXGISwapChain> dxgiChain;
/** Window handle of the window we belong to */
HWND hwnd;
/** Format of the surface */
cairo_format_t format;
cairo_clip_t clip;
d2d_clip *d2d_clip;
/** Mask layer used by surface_mask to push opacity masks */
RefPtr<ID2D1Layer> maskLayer;
/**
* Layer used for clipping when tiling, and also for clearing out geometries
* - lazily initialized
*/
RefPtr<ID2D1Layer> helperLayer;
/** If this layer currently is clipping, used to prevent excessive push/pops */
bool clipping;
/** Brush used for bitmaps */
RefPtr<ID2D1BitmapBrush> bitmapBrush;
/** Brush used for solid colors */
RefPtr<ID2D1SolidColorBrush> solidColorBrush;
/** Indicates if our render target is currently in drawing mode */
bool isDrawing;
/** Indicates if text rendering is initialized */
bool textRenderingInit;
RefPtr<ID3D10RenderTargetView> buffer_rt_view;
RefPtr<ID3D10ShaderResourceView> buffer_sr_view;
//cairo_surface_clipper_t clipper;
};
typedef struct _cairo_d2d_surface cairo_d2d_surface_t;
typedef HRESULT (WINAPI*D2D1CreateFactoryFunc)(
__in D2D1_FACTORY_TYPE factoryType,
__in REFIID iid,
__in_opt CONST D2D1_FACTORY_OPTIONS *pFactoryOptions,
__out void **factory
);
typedef HRESULT (WINAPI*D3D10CreateDevice1Func)(
IDXGIAdapter *pAdapter,
D3D10_DRIVER_TYPE DriverType,
HMODULE Software,
UINT Flags,
D3D10_FEATURE_LEVEL1 HardwareLevel,
UINT SDKVersion,
ID3D10Device1 **ppDevice
);
typedef HRESULT (WINAPI*D3D10CreateEffectFromMemoryFunc)(
void *pData,
SIZE_T DataLength,
UINT FXFlags,
ID3D10Device *pDevice,
ID3D10EffectPool *pEffectPool,
ID3D10Effect **ppEffect
);
#endif /* CAIRO_HAS_D2D_SURFACE */
#endif /* CAIRO_D2D_PRIVATE_H */
/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
/* Cairo - a vector graphics library with display and print output
*
* Copyright © 2010 Mozilla Foundation
*
* This library is free software; you can redistribute it and/or
* modify it either under the terms of the GNU Lesser General Public
* License version 2.1 as published by the Free Software Foundation
* (the "LGPL") or, at your option, under the terms of the Mozilla
* Public License Version 1.1 (the "MPL"). If you do not alter this
* notice, a recipient may use your version of this file under either
* the MPL or the LGPL.
*
* You should have received a copy of the LGPL along with this library
* in the file COPYING-LGPL-2.1; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* You should have received a copy of the MPL along with this library
* in the file COPYING-MPL-1.1
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
* OF ANY KIND, either express or implied. See the LGPL or the MPL for
* the specific language governing rights and limitations.
*
* The Original Code is the cairo graphics library.
*
* The Initial Developer of the Original Code is the Mozilla Foundation
*
* Contributor(s):
* Bas Schouten <bschouten@mozilla.com>
*/
#ifndef CAIRO_D2D_PRIVATE_H
#define CAIRO_D2D_PRIVATE_H
#ifdef CAIRO_HAS_D2D_SURFACE
#include <windows.h>
#include <d2d1.h>
#include <d3d10.h>
#include <dxgi.h>
extern "C" {
#include "cairoint.h"
#include "cairo-surface-clipper-private.h"
}
#include "cairo-win32-refptr.h"
#include "cairo-d2d-private-fx.h"
#include "cairo-win32.h"
/* describes the type of the currently applied clip so that we can pop it */
struct d2d_clip;
#define MAX_OPERATORS CAIRO_OPERATOR_HSL_LUMINOSITY + 1
struct _cairo_d2d_device
{
cairo_device_t base;
HMODULE mD3D10_1;
RefPtr<ID3D10Device1> mD3D10Device;
RefPtr<ID3D10Effect> mSampleEffect;
RefPtr<ID3D10InputLayout> mInputLayout;
RefPtr<ID3D10Buffer> mQuadBuffer;
RefPtr<ID3D10RasterizerState> mRasterizerState;
RefPtr<ID3D10BlendState> mBlendStates[MAX_OPERATORS];
/** Texture used for manual glyph rendering */
RefPtr<ID3D10Texture2D> mTextTexture;
RefPtr<ID3D10ShaderResourceView> mTextTextureView;
int mVRAMUsage;
};
const unsigned int TEXT_TEXTURE_WIDTH = 2048;
const unsigned int TEXT_TEXTURE_HEIGHT = 512;
typedef struct _cairo_d2d_device cairo_d2d_device_t;
struct _cairo_d2d_surface {
_cairo_d2d_surface() : d2d_clip(NULL), clipping(false), isDrawing(false),
textRenderingInit(true)
{
_cairo_clip_init (&this->clip);
}
cairo_surface_t base;
/* Device used by this surface
* NOTE: In upstream cairo this is in the surface base class */
cairo_d2d_device_t *device;
/** Render target of the texture we render to */
RefPtr<ID2D1RenderTarget> rt;
/** Surface containing our backstore */
RefPtr<ID3D10Resource> surface;
/**
* Surface used to temporarily store our surface if a bitmap isn't available
* straight from our render target surface.
*/
RefPtr<ID3D10Texture2D> bufferTexture;
/** Backbuffer surface hwndrt renders to (NULL if not a window surface) */
RefPtr<IDXGISurface> backBuf;
/** Bitmap shared with texture and rendered to by rt */
RefPtr<ID2D1Bitmap> surfaceBitmap;
/** Swap chain holding our backbuffer (NULL if not a window surface) */
RefPtr<IDXGISwapChain> dxgiChain;
/** Window handle of the window we belong to */
HWND hwnd;
/** Format of the surface */
cairo_format_t format;
cairo_clip_t clip;
d2d_clip *d2d_clip;
/** Mask layer used by surface_mask to push opacity masks */
RefPtr<ID2D1Layer> maskLayer;
/**
* Layer used for clipping when tiling, and also for clearing out geometries
* - lazily initialized
*/
RefPtr<ID2D1Layer> helperLayer;
/** If this layer currently is clipping, used to prevent excessive push/pops */
bool clipping;
/** Brush used for bitmaps */
RefPtr<ID2D1BitmapBrush> bitmapBrush;
/** Brush used for solid colors */
RefPtr<ID2D1SolidColorBrush> solidColorBrush;
/** Indicates if our render target is currently in drawing mode */
bool isDrawing;
/** Indicates if text rendering is initialized */
bool textRenderingInit;
RefPtr<ID3D10RenderTargetView> buffer_rt_view;
RefPtr<ID3D10ShaderResourceView> buffer_sr_view;
//cairo_surface_clipper_t clipper;
};
typedef struct _cairo_d2d_surface cairo_d2d_surface_t;
typedef HRESULT (WINAPI*D2D1CreateFactoryFunc)(
__in D2D1_FACTORY_TYPE factoryType,
__in REFIID iid,
__in_opt CONST D2D1_FACTORY_OPTIONS *pFactoryOptions,
__out void **factory
);
typedef HRESULT (WINAPI*D3D10CreateDevice1Func)(
IDXGIAdapter *pAdapter,
D3D10_DRIVER_TYPE DriverType,
HMODULE Software,
UINT Flags,
D3D10_FEATURE_LEVEL1 HardwareLevel,
UINT SDKVersion,
ID3D10Device1 **ppDevice
);
typedef HRESULT (WINAPI*D3D10CreateEffectFromMemoryFunc)(
void *pData,
SIZE_T DataLength,
UINT FXFlags,
ID3D10Device *pDevice,
ID3D10EffectPool *pEffectPool,
ID3D10Effect **ppEffect
);
#endif /* CAIRO_HAS_D2D_SURFACE */
#endif /* CAIRO_D2D_PRIVATE_H */

File diff suppressed because it is too large Load Diff

View File

@ -191,45 +191,45 @@ const cairo_scaled_font_backend_t _cairo_dwrite_scaled_font_backend = {
};
/* Helper conversion functions */
/**
* Get a D2D matrix from a cairo matrix. Note that D2D uses row vectors where cairo
* uses column vectors. Hence the transposition.
*
* \param Cairo matrix
* \return D2D matrix
*/
static D2D1::Matrix3x2F
_cairo_d2d_matrix_from_matrix(const cairo_matrix_t *matrix)
{
return D2D1::Matrix3x2F((FLOAT)matrix->xx,
(FLOAT)matrix->yx,
(FLOAT)matrix->xy,
(FLOAT)matrix->yy,
(FLOAT)matrix->x0,
(FLOAT)matrix->y0);
}
/**
* Get a DirectWrite matrix from a cairo matrix. Note that DirectWrite uses row
* vectors where cairo uses column vectors. Hence the transposition.
*
* \param Cairo matrix
* \return DirectWrite matrix
*/
DWRITE_MATRIX
_cairo_dwrite_matrix_from_matrix(const cairo_matrix_t *matrix)
{
/**
* Get a D2D matrix from a cairo matrix. Note that D2D uses row vectors where cairo
* uses column vectors. Hence the transposition.
*
* \param Cairo matrix
* \return D2D matrix
*/
static D2D1::Matrix3x2F
_cairo_d2d_matrix_from_matrix(const cairo_matrix_t *matrix)
{
return D2D1::Matrix3x2F((FLOAT)matrix->xx,
(FLOAT)matrix->yx,
(FLOAT)matrix->xy,
(FLOAT)matrix->yy,
(FLOAT)matrix->x0,
(FLOAT)matrix->y0);
}
/**
* Get a DirectWrite matrix from a cairo matrix. Note that DirectWrite uses row
* vectors where cairo uses column vectors. Hence the transposition.
*
* \param Cairo matrix
* \return DirectWrite matrix
*/
DWRITE_MATRIX
_cairo_dwrite_matrix_from_matrix(const cairo_matrix_t *matrix)
{
DWRITE_MATRIX dwmat;
dwmat.m11 = (FLOAT)matrix->xx;
dwmat.m12 = (FLOAT)matrix->yx;
dwmat.m21 = (FLOAT)matrix->xy;
dwmat.m22 = (FLOAT)matrix->yy;
dwmat.dx = (FLOAT)matrix->x0;
dwmat.dy = (FLOAT)matrix->y0;
return dwmat;
}
dwmat.dy = (FLOAT)matrix->y0;
return dwmat;
}
/* Helper functions for cairo_dwrite_scaled_glyph_init */
cairo_int_status_t
@ -1080,11 +1080,11 @@ _dwrite_draw_glyphs_to_gdi_surface_gdi(cairo_win32_surface_t *surface,
area.bottom - area.top,
&rt);
/**
* We set the number of pixels per DIP to 1.0. This is because we always want
* to draw in device pixels, and not device independent pixels. On high DPI
* systems this value will be higher than 1.0 and automatically upscale
* fonts, we don't want this since we do our own upscaling for various reasons.
/**
* We set the number of pixels per DIP to 1.0. This is because we always want
* to draw in device pixels, and not device independent pixels. On high DPI
* systems this value will be higher than 1.0 and automatically upscale
* fonts, we don't want this since we do our own upscaling for various reasons.
*/
rt->SetPixelsPerDip(1.0);

View File

@ -1,37 +1,37 @@
/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
/* Cairo - a vector graphics library with display and print output
*
* Copyright © 2010 Mozilla Foundation
*
* This library is free software; you can redistribute it and/or
* modify it either under the terms of the GNU Lesser General Public
* License version 2.1 as published by the Free Software Foundation
* (the "LGPL") or, at your option, under the terms of the Mozilla
* Public License Version 1.1 (the "MPL"). If you do not alter this
* notice, a recipient may use your version of this file under either
* the MPL or the LGPL.
*
* You should have received a copy of the LGPL along with this library
* in the file COPYING-LGPL-2.1; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* You should have received a copy of the MPL along with this library
* in the file COPYING-MPL-1.1
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
* OF ANY KIND, either express or implied. See the LGPL or the MPL for
* the specific language governing rights and limitations.
*
* The Original Code is the cairo graphics library.
*
* The Initial Developer of the Original Code is the Mozilla Foundation
*
* Contributor(s):
* Bas Schouten <bschouten@mozilla.com>
/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
/* Cairo - a vector graphics library with display and print output
*
* Copyright © 2010 Mozilla Foundation
*
* This library is free software; you can redistribute it and/or
* modify it either under the terms of the GNU Lesser General Public
* License version 2.1 as published by the Free Software Foundation
* (the "LGPL") or, at your option, under the terms of the Mozilla
* Public License Version 1.1 (the "MPL"). If you do not alter this
* notice, a recipient may use your version of this file under either
* the MPL or the LGPL.
*
* You should have received a copy of the LGPL along with this library
* in the file COPYING-LGPL-2.1; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* You should have received a copy of the MPL along with this library
* in the file COPYING-MPL-1.1
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
* OF ANY KIND, either express or implied. See the LGPL or the MPL for
* the specific language governing rights and limitations.
*
* The Original Code is the cairo graphics library.
*
* The Initial Developer of the Original Code is the Mozilla Foundation
*
* Contributor(s):
* Bas Schouten <bschouten@mozilla.com>
*/
#include <dwrite.h>
#include <D2d1.h>
@ -115,11 +115,11 @@ struct _cairo_dwrite_scaled_font {
};
typedef struct _cairo_dwrite_scaled_font cairo_dwrite_scaled_font_t;
DWRITE_MATRIX _cairo_dwrite_matrix_from_matrix(const cairo_matrix_t *matrix);
// This will create a DWrite glyph run from cairo glyphs and a scaled_font.
// It is important to note the array members of DWRITE_GLYPH_RUN should be
// deleted by the caller.
DWRITE_MATRIX _cairo_dwrite_matrix_from_matrix(const cairo_matrix_t *matrix);
// This will create a DWrite glyph run from cairo glyphs and a scaled_font.
// It is important to note the array members of DWRITE_GLYPH_RUN should be
// deleted by the caller.
void
_cairo_dwrite_glyph_run_from_glyphs(cairo_glyph_t *glyphs,
int num_glyphs,

View File

@ -126,13 +126,13 @@ cairo_dwrite_font_face_create_for_dwrite_fontface(void *dwrite_font, void *dwrit
#endif /* CAIRO_HAS_DWRITE_FONT */
#if CAIRO_HAS_D2D_SURFACE
struct _cairo_device
{
int type;
int refcount;
};
typedef struct _cairo_device cairo_device_t;
struct _cairo_device
{
int type;
int refcount;
};
typedef struct _cairo_device cairo_device_t;
/**
* Create a D2D device