Commit graph

97 commits

Author SHA1 Message Date
Marcian Lytwyn
66866885ef Merge with trunk revision 40072
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@40135 72102866-910b-0410-8b05-ffd578937521
2016-10-06 14:00:51 +00:00
Marcian Lytwyn
c43e467784 Merge GNUstep back with main trunk revision 38789
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@38797 72102866-910b-0410-8b05-ffd578937521
2015-07-14 22:36:43 +00:00
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
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
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
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
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
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
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
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
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
282a590ad5 core/back: replace objc_{malloc/free} with malloc/free
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31629 72102866-910b-0410-8b05-ffd578937521
2010-11-18 20:28:15 +00:00
Fred Kiefer
7a8c2adea4 * Source/cairo/CairoGState.m
(-compositeGState:fromRect:toPoint:op:fraction:): Move the usage
of _ct and source->_ct after the check whether they are set.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30588 72102866-910b-0410-8b05-ffd578937521
2010-06-06 19:56:35 +00:00
Quentin Mathe
b53fe57e7c Fixed many drawing issues (many ones being related to the flipping).
See bug report #27782

In particular, fixed -[NSImage drawXXX] and -[NSImage composite/dissolveXXX] 
methods to work exactly as Cocoa when the Cairo backend is used.
Added a new draw operator (in addition to composite) to the backend. Cairo is 
the only backend that implements it for now.
Eliminated as many flipping checks as possible.

Warning: Untested with the winlib backend. 
You must update, recompile and install both Back and Gui.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30523 72102866-910b-0410-8b05-ffd578937521
2010-06-01 11:04:36 +00:00
Fred Kiefer
5253105797 * Source/cairo/CairoGState.m: Only use calls for
cairo_pattern_set_extend() on cairo > 1.6.0.
Patch suggested by Eric Wasylishen <ewasylishen@gmail.com>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29868 72102866-910b-0410-8b05-ffd578937521
2010-03-07 21:40:36 +00:00
Richard Frith-MacDonald
18ab944a93 update to avoid obsolete function
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29844 72102866-910b-0410-8b05-ffd578937521
2010-03-05 06:52:53 +00:00
Fred Kiefer
92fdccd8d3 Adjust to the CGFloat change for NSFont
and NSAffineTransform done in base and gui.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29689 72102866-910b-0410-8b05-ffd578937521
2010-02-20 16:33:30 +00:00
Eric Wasylishen
1c46dd6417 Cairo backend:
-DPSsetflat: and -DPScurrentflat should not have been transforming
the flatness value with the current transformation matrix.
The effect of this could be seen in the Apple BezierPathLab example;
zooming in on the circle caused it to look more and more like a
polygon.

Also set NSBezierPath default flatness to 0.6 to match OS X
(it was 1.0, which made circles look a bit rough)


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29145 72102866-910b-0410-8b05-ffd578937521
2009-12-20 18:47:26 +00:00
Fred Kiefer
9a47060a5a Patch by Eric Wasylishen to set the pattern extend in the cairo backend.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29122 72102866-910b-0410-8b05-ffd578937521
2009-12-14 14:05:32 +00:00
Fred Kiefer
ebfac7ae21 Set colour for cairo text drawing.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28964 72102866-910b-0410-8b05-ffd578937521
2009-11-06 09:58:09 +00:00
Fred Kiefer
6a453d533c Correct -setColor:state: to handle alpha better.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28957 72102866-910b-0410-8b05-ffd578937521
2009-11-04 21:56:49 +00:00
Fred Kiefer
2520a756ac Correct stroke colour handling.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28948 72102866-910b-0410-8b05-ffd578937521
2009-11-03 22:52:28 +00:00
Fred Kiefer
c172ce04b1 Remove commented out code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28944 72102866-910b-0410-8b05-ffd578937521
2009-11-03 08:57:28 +00:00
Fred Kiefer
55a29294d2 Use the offset adjustment for cairo > 1.8 in the general case.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28943 72102866-910b-0410-8b05-ffd578937521
2009-11-03 08:39:15 +00:00
Fred Kiefer
6653ef68cc Add simple gradient implementation for the cairo backend.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28873 72102866-910b-0410-8b05-ffd578937521
2009-10-23 20:46:41 +00:00
Fred Kiefer
3c8eab0c49 Implement pattern colours for all backends.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28850 72102866-910b-0410-8b05-ffd578937521
2009-10-19 14:17:45 +00:00
Fred Kiefer
a9dae5b3a7 Patch for the cairo scrolling issue. This will need a lot of testing!
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28389 72102866-910b-0410-8b05-ffd578937521
2009-07-10 08:11:39 +00:00
Fred Kiefer
0f7b2e89cb Finish rework of composite operators started four years ago.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28313 72102866-910b-0410-8b05-ffd578937521
2009-05-31 19:46:28 +00:00
Fred Kiefer
33ccb792b2 Correct bug in last change.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@27800 72102866-910b-0410-8b05-ffd578937521
2009-02-06 10:11:30 +00:00
Fred Kiefer
dac60cb4d2 Better handling of clip copying when the clip is not representable by cairo.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@27797 72102866-910b-0410-8b05-ffd578937521
2009-02-05 18:44:18 +00:00
Fred Kiefer
f99e97c43e Implement new method -setPartentWindow:forChildWindow: for X and
Windows.

Adjust y coordinate of point in compositeGState:... for cairo. This
solves bug #24709. 


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@27718 72102866-910b-0410-8b05-ffd578937521
2009-01-29 09:32:32 +00:00
Fred Kiefer
9781c27f45 Small improvements for cairo backend.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26711 72102866-910b-0410-8b05-ffd578937521
2008-06-25 22:20:18 +00:00
Adam Fedor
250ebdfad0 Revert library license version to 2 until applications can be converted
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26620 72102866-910b-0410-8b05-ffd578937521
2008-06-10 04:12:46 +00:00
Fred Kiefer
049d17ef30 Correct black bar for cairo > 1.6.0
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26605 72102866-910b-0410-8b05-ffd578937521
2008-06-07 16:39:08 +00:00
Fred Kiefer
7bf8083235 Small memory fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26580 72102866-910b-0410-8b05-ffd578937521
2008-05-27 22:29:25 +00:00
Fred Kiefer
9ca5ecc181 Correct cairo glyph to path conversion.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26426 72102866-910b-0410-8b05-ffd578937521
2008-04-02 22:10:32 +00:00
Fred Kiefer
19dda8e5a7 Clean up and better error check and reporting on cairo and malloc calls.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26391 72102866-910b-0410-8b05-ffd578937521
2008-03-29 13:16:58 +00:00
Fred Kiefer
ca93f5c895 Correct the cairo version #ifdef.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26220 72102866-910b-0410-8b05-ffd578937521
2008-03-06 08:35:20 +00:00
Fred Kiefer
1a8804adbb Convert floats from user space to drawing space and visa versa.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@25553 72102866-910b-0410-8b05-ffd578937521
2007-11-05 11:01:59 +00:00
Fred Kiefer
0f8c5487c7 Change files to use GPL 3 and LGPL 3.
Prepare for next release.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@25538 72102866-910b-0410-8b05-ffd578937521
2007-10-29 23:25:10 +00:00
Fred Kiefer
8d37c37008 Hack to get drawing on non-retained windows working.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@25529 72102866-910b-0410-8b05-ffd578937521
2007-10-18 16:51:56 +00:00