Commit graph

160 commits

Author SHA1 Message Date
Frank Le Grand
1b82d912b5 Merged Trunk changes from rev 35217 to TestPlant branch.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@36952 72102866-910b-0410-8b05-ffd578937521
2013-08-09 14:21:15 +00:00
Marcian Lytwyn
36d045cf0a Move win32 header files to enclosed section
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@36911 72102866-910b-0410-8b05-ffd578937521
2013-07-21 13:22:59 +00:00
Marcian Lytwyn
afe41336df Work around fix for non-retained buffered windows not re-displaying correctly with cairo on MSWindows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@36907 72102866-910b-0410-8b05-ffd578937521
2013-07-20 16:32:35 +00:00
Marcian Lytwyn
95a8e8d68f Basic changes for clearer code review
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@36651 72102866-910b-0410-8b05-ffd578937521
2013-05-19 22:46:35 +00:00
Marcian Lytwyn
16ef33d4c4 Use device parameter rather than GSWINDEVICE macro in case self destroyed
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@36604 72102866-910b-0410-8b05-ffd578937521
2013-05-09 01:49:46 +00:00
Marcian Lytwyn
612a141f28 Check for self=nil before processing in init
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@36603 72102866-910b-0410-8b05-ffd578937521
2013-05-09 01:32:02 +00:00
Marcian Lytwyn
a91ebbd8b8 Add cursor and screen capture functionality to windows backend for color panel support
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35995 72102866-910b-0410-8b05-ffd578937521
2013-01-17 23:09:35 +00:00
Marcian Lytwyn
aae0f7748c Merge back with main branch
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35813 72102866-910b-0410-8b05-ffd578937521
2012-11-21 20:53:22 +00:00
Marcian Lytwyn
0ebb1b1411 Don't release DC's for non-retained surfaces
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35743 72102866-910b-0410-8b05-ffd578937521
2012-10-25 21:28:28 +00:00
Marcian Lytwyn
2d72a18f1a Another stray log
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35741 72102866-910b-0410-8b05-ffd578937521
2012-10-25 19:26:26 +00:00
Marcian Lytwyn
e5e02267f9 Remove debug log
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35740 72102866-910b-0410-8b05-ffd578937521
2012-10-25 19:15:48 +00:00
Marcian Lytwyn
41ebb7a852 HOPEFULLY - final changes for cairo
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35739 72102866-910b-0410-8b05-ffd578937521
2012-10-25 18:53:03 +00:00
Marcian Lytwyn
aa519f55a8 Additional updates for windows backend
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35707 72102866-910b-0410-8b05-ffd578937521
2012-10-17 20:08:34 +00:00
Marcian Lytwyn
9b0f83a5d9 TEMPORARY updates for cairo processing on MSWindows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35666 72102866-910b-0410-8b05-ffd578937521
2012-10-11 20:40:21 +00:00
Marcian Lytwyn
0cfb23088f Yet another temporary fix for cairo window expose method
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35576 72102866-910b-0410-8b05-ffd578937521
2012-09-19 18:06:44 +00:00
Marcian Lytwyn
a63d526943 TEMPORARY FIX for borderless windows i.e. WS_POPUP types
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35540 72102866-910b-0410-8b05-ffd578937521
2012-09-07 20:04:11 +00:00
Marcian Lytwyn
005f0ee278 Remove unecessary and invalid win32 include
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35479 72102866-910b-0410-8b05-ffd578937521
2012-08-29 22:53:26 +00:00
Marcian Lytwyn
7a892f25ce Fix outstanding Win32 cairo code and configure issues
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35478 72102866-910b-0410-8b05-ffd578937521
2012-08-29 21:34:21 +00:00
Marcian Lytwyn
5f7ea64199 Cairo win32 fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35370 72102866-910b-0410-8b05-ffd578937521
2012-08-08 22:23:43 +00:00
Marcian Lytwyn
110201169d Cairo win32 fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35369 72102866-910b-0410-8b05-ffd578937521
2012-08-08 22:23:13 +00:00
Marcian Lytwyn
49f971cb28 Cairo win32 fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35368 72102866-910b-0410-8b05-ffd578937521
2012-08-08 22:22:36 +00:00
Marcian Lytwyn
f5c781e78f Cairo win32 fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35367 72102866-910b-0410-8b05-ffd578937521
2012-08-08 22:22:10 +00:00
Marcian Lytwyn
598be2609a Cairo win32 implementation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35366 72102866-910b-0410-8b05-ffd578937521
2012-08-08 22:21:19 +00:00
Fred Kiefer
7c8e4e9821 * Source/cairo/CairoGState.m: Set the filter to BILINEAR for all
patterns we use.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34791 72102866-910b-0410-8b05-ffd578937521
2012-02-20 11:30:22 +00:00
Fred Kiefer
996c877868 Use difference operator only for cairo version >= 1.9.4.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34776 72102866-910b-0410-8b05-ffd578937521
2012-02-19 12:19:09 +00:00
Fred Kiefer
234ac0932b Replace NSCompositeHighlight with GSCompositeHighlight and map NSCompositeHighlight onto
NSCompositeSourceOver.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34773 72102866-910b-0410-8b05-ffd578937521
2012-02-18 21:10:07 +00:00
Eric Wasylishen
088912afe1 * Source/cairo/CairoFontInfo.m (-setupAttributes):
use CAIRO_HINT_METRICS_ON instead of CAIRO_HINT_METRICS_OFF,
otherwise some text is cut of (e.g. quit Ink with unsaved
changes, the "t" in "Quit" in the dialog is cut off)


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34613 72102866-910b-0410-8b05-ffd578937521
2012-01-23 22:53:57 +00:00
Eric Wasylishen
9d52d255cb * Source/cairo/CairoFontInfo.m (-setupAttributes):
We must not leave the hinting settings as their defaults,
because if we did, that would mean using the surface defaults
which might or might not use hinting (xlib does by default.)

Since we make measurements outside of the context of a surface
(-advancementForGlyph:), we need to ensure that the same
hinting settings are used there as when we draw. For now,
just force hinting to be off.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34612 72102866-910b-0410-8b05-ffd578937521
2012-01-23 22:40:29 +00:00
Fred Kiefer
ea4772c07e * Source/winlib/WIN32FontEnumerator.m,
* Source/cairo/CairoFontEnumerator.m,
* Source/xlib/GSXftFontInfo.m,
* Source/xlib/XGFont.m: Use NSDebugLLog instead of NSDebugLog to
reduce amount of default output.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34493 72102866-910b-0410-8b05-ffd578937521
2012-01-11 08:47:27 +00:00
Eric Wasylishen
caa986a9d6 * Source/cairo/CairoGState.m (-GSShowGlyphsWithAdvances:):
Update the current point after drawing text. Should not affect
anything in gui right now, but will be useful later.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34388 72102866-910b-0410-8b05-ffd578937521
2012-01-02 09:23:05 +00:00
Eric Wasylishen
b6588a43bd * Source/cairo/CairoContext.m (-beginPrologueBBox:...):
Add a hack to get landscape printing working. Comment in the source
reproduced here:
FIXME: This is confusing... When an 8.5x11 page is set to
landscape, NSPrintInfo also swaps the paperSize to be 11x8.5,
but gui also adds a 90 degree rotation as if it will
be drawing on a 8.5x11 page. So, swap 11x8.5 back to 8.5x11 here.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34356 72102866-910b-0410-8b05-ffd578937521
2011-12-24 18:44:53 +00:00
Eric Wasylishen
4f613a2a66 * Source/cairo/CairoContext.m (-beginPrologueBBox:...): Use
paper size from print info to set the cairo page size, instead
of using the bounding box (which is usually smaller than the
paper size, and was causing cairo print output to be wrong
compared to GNUstep's built-in PostScript writer.)


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34351 72102866-910b-0410-8b05-ffd578937521
2011-12-23 19:01:45 +00:00
Fred Kiefer
b5d10eade8 * Source/cairo/CairoFontEnumerator.m: Define FC_WEIGHT_ULTRABLACK
for old versions of fontconfig.
Patch by Richard Frith-Macdonald <rfm@gnu.org>


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34035 72102866-910b-0410-8b05-ffd578937521
2011-10-20 09:15:58 +00:00
Eric Wasylishen
d7b7322723 * Source/cairo/GNUmakefile:
* Source/cairo/CairoContext.m:
* Source/cairo/CairoSurface.m:
* Source/cairo/XGCairoModernSurface.m:
* Headers/cairo/XGCairoModernSurface.h:
* Headers/cairo/CairoSurface.h: New cairo surface which uses
cairo_surface_create_similar to create a back buffer which
has an alpha channel, even if the X server doesn't support
surfaces with alpha. This new surface is also made the default
since this seems to be the recommended way to double buffer
with cairo.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33978 72102866-910b-0410-8b05-ffd578937521
2011-10-13 21:37:44 +00:00
Eric Wasylishen
9e4b957085 * Source/cairo/CairoContext.m: revert the last change for now
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33855 72102866-910b-0410-8b05-ffd578937521
2011-09-18 20:37:00 +00:00
Eric Wasylishen
9b930f8ec7 * Source/cairo/CairoContext.m: Switch to XGCairoSurface by default,
because it fixes the corrupted display problem reported by Riccardo
on 16-bit displays.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33849 72102866-910b-0410-8b05-ffd578937521
2011-09-16 23:56:01 +00:00
Fred Kiefer
172dc48fe7 * Source/cairo/CairoGState.m (-saveClip, -restoreClip:,
-drawGradient:...): Check that the _ct isnt NULL.
* Source/cairo/CairoGState.m (doubleFromUserSpace,
  floatToUserSpace): Use correct types in these helper functions.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33830 72102866-910b-0410-8b05-ffd578937521
2011-09-12 10:40:52 +00:00
Eric Wasylishen
ea5cc1646e * Source/cairo/CairoGState.m (-drawGState:...): Check that the source
context is non-NULL before calling cairo_get_target on it. Log a warning
when either the source context or target context is NULL.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33828 72102866-910b-0410-8b05-ffd578937521
2011-09-12 00:46:15 +00:00
Eric Wasylishen
ee87a3db27 * Source/cairo/CairoGState.m (-drawGState:...): Use CAIRO_EXTEND_PAD
on the pattern to prevent blurred edges when scaling up.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33759 72102866-910b-0410-8b05-ffd578937521
2011-08-17 05:47:18 +00:00
Eric Wasylishen
1858519713 * Source/cairo/CairoGState.m (-DPSstroke:): If the line width is
0, temporarily set it to 1 unit wide (in device space.) This
is an attempt at matching the behaviour of the setlinewidth
PostScript operator, which is supposed to interpret 0 as meaning
the thinnest line that the output device can draw.
Note that Quartz (and cairo) draw nothing with a line width of 0.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33739 72102866-910b-0410-8b05-ffd578937521
2011-08-15 19:23:49 +00:00
Eric Wasylishen
f3149ce164 * Headers/cairo/CairoGState.h:
* Source/cairo/CairoGState.m: Remove most of the rounding code and
implementation of DPSstrokeadjust.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33492 72102866-910b-0410-8b05-ffd578937521
2011-07-08 21:02:06 +00:00
Eric Wasylishen
3c80cf5c92 * Source/cairo/XGCairoSurface.m (-contentsOfScreen:inRect:):
Use the passed rect properly.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33444 72102866-910b-0410-8b05-ffd578937521
2011-07-03 23:59:35 +00:00
Eric Wasylishen
9bc09976ee * Source/cairo/XGCairoSurface.m: Implementation of
-[GSDisplayServer contentsOfScreen:inRect:] for x11/cairo


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33443 72102866-910b-0410-8b05-ffd578937521
2011-07-03 23:45:22 +00:00
Fred Kiefer
084e5ade90 Revert last change as gui is fixed now.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33305 72102866-910b-0410-8b05-ffd578937521
2011-06-14 22:27:58 +00:00
Fred Kiefer
5a950060d0 * Source/cairo/CairoContext.m (-supportsDrawGState): Delegate to
gstate.
* Headers/cairo/CairoGState.h (-supportsDrawGState): Declare this method.
* Source/cairo/CairoGState.m (-supportsDrawGState): Only allow the
faster drawing operation when the clip can be represented as a
list of rectangles.
* Source/cairo/CairoGState.m (-copyWithZone:): Always free the
clip rectangle list.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33289 72102866-910b-0410-8b05-ffd578937521
2011-06-13 12:34:52 +00:00
Eric Wasylishen
07638f13fc * Source/winlib/WIN32GState.m:
* Source/art/ARTGState.m:
* Source/cairo/CairoGState.m:
* Source/xlib/XGGState.m:
* Source/gsc/GSContext.m:
* Source/gsc/GSGState.m:
* Headers/gsc/GSGStateOps.h:
Add a new interface, GSShowGlyphsWithAdvances, which replaces
GSShowGlyphs as the primitive text drawing method.

None of the backends implement it properly yet; I simply renamed
the existing -GSShowGlyphs:: methods to -GSShowGlyphsWithAdvances:::,
so they currently ignore the glyph advances.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33121 72102866-910b-0410-8b05-ffd578937521
2011-05-26 03:48:58 +00:00
Fred Kiefer
c03b2d3a3b Protect the name id.
Patch by Sebastian Reitenbach <sebastia@l00-bugdead-prods.de>


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33065 72102866-910b-0410-8b05-ffd578937521
2011-05-19 07:37:29 +00:00
Eric Wasylishen
8b0d34990e * Undo the previous change and try a different approach..
just cache the character set in CairoFaceInfo, but load them
as needed as we were doing before.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@32987 72102866-910b-0410-8b05-ffd578937521
2011-05-05 20:05:13 +00:00
Eric Wasylishen
016af1f41c * Source/cairo/CairoFontEnumerator.m:
* Source/cairo/CairoFaceInfo (-characterSet): Remove the call to
FcFontMatch in -characterSet which was a big performace
bottleneck.
Instead load the character set data when enumerating all fonts in
CairoFontEnumerator.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@32986 72102866-910b-0410-8b05-ffd578937521
2011-05-05 19:18:43 +00:00
Eric Wasylishen
575901b00d back: c89 compat.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@32882 72102866-910b-0410-8b05-ffd578937521
2011-04-17 23:08:30 +00:00