fredkiefer
fd84d377f2
* Source/opal/OpalGState.m: Add colour handling for all the different
...
colour spaces.
2019-01-03 23:06:51 +01:00
fredkiefer
442eb2515e
* Source/opal/OpalContext.m (-initWithGraphicsPort:flipped:): Implement.
...
* Source/opal/OpalContext.m (-GSSetDevice:::): Get height form
surface if no y value is given.
* Source/opal/OpalSurface.m: Rewrite to handle the case where
device is not set.
2018-09-16 17:27:48 +02:00
Daniel Ferreira
5f62df88d3
opal/bridge: implement bridge between GUI and Opal types
...
Implement a bridge between NSColor and CGColorRef and a stub for a
bridge between NSImage and CGImageRef. This improves compatibility with
Quartz.
2017-07-25 11:59:52 +10:00
Daniel Ferreira
720a56dcf3
opal/context: allow the client to supply a graphics port
...
In Quartz, the "graphics port" bound to an NSGraphicsContext (subclassed
by OpalContext) is a CGContext. We currently initialize one in
OpalSurface if it does not exist, however we do not allow the client to
initialize a graphics context with a custom graphics port, which should
be allowed. This commit enables this feature.
2017-07-25 11:59:52 +10:00
Fred Kiefer
7befdbcf6b
Small opal changes.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@40047 72102866-910b-0410-8b05-ffd578937521
2016-08-02 20:48:01 +00:00
Fred Kiefer
24be840e39
My final GNUstep commit.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@39237 72102866-910b-0410-8b05-ffd578937521
2015-12-13 17:55:23 +00:00
Fred Kiefer
c5ef196157
* Headers/opal/OpalSurface.h
...
* Source/opal/OpalSurface.m: Make the -device method public.
* Headers/opal/OpalContext.h: Remove method definitions.
* Source/opal/OpalContext.m: Limit the accepted image types.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37172 72102866-910b-0410-8b05-ffd578937521
2013-09-29 20:11:38 +00:00
Fred Kiefer
1c35214821
* Headers/opal/OpalSurface.h
...
* Source/opal/OpalSurface.m: Remove compiler warnings.
* Source/opal/OpalContext.m: Move -flushGraphics method to here.
* Source/opal/OpalGState.m: Simplify -DPSimage. Evaluate CGCTX
only once per method.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37170 72102866-910b-0410-8b05-ffd578937521
2013-09-29 17:10:26 +00:00
Fred Kiefer
78b3ef9b31
Started cleanup of opal backend.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37167 72102866-910b-0410-8b05-ffd578937521
2013-09-29 07:30:20 +00:00
Eric Wasylishen
84ad6eabc5
* Source/opal/OpalGState.m: move variable declaration outside of for loop
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37149 72102866-910b-0410-8b05-ffd578937521
2013-09-23 19:53:33 +00:00
Ivan Vučica
af62575bee
Compile fix
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37148 72102866-910b-0410-8b05-ffd578937521
2013-09-23 19:51:59 +00:00
Ivan Vučica
0cba103120
Compile fix
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37147 72102866-910b-0410-8b05-ffd578937521
2013-09-23 19:45:09 +00:00
Ivan Vučica
171af98132
OpalGState: Fixed a compile error (extra #endif). Added -DPSsetdash:::. Added stub -DPSsetstrokeadjust:.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37146 72102866-910b-0410-8b05-ffd578937521
2013-09-23 18:57:10 +00:00
Ivan Vučica
653eec3473
Cutting down on junk code and unneeded output.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37145 72102866-910b-0410-8b05-ffd578937521
2013-09-23 18:38:40 +00:00
Ivan Vučica
4815f8b518
Fixed images appearing in bottom left corner first.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37144 72102866-910b-0410-8b05-ffd578937521
2013-09-23 18:29:40 +00:00
Ivan Vučica
595cc19471
Fixes for doublebuffering. (Nearly?) correct implementation of -compositeGState: and -drawGState:. Temporarily fixed image drawing issues by lying about drawing to screen.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37142 72102866-910b-0410-8b05-ffd578937521
2013-09-23 18:04:06 +00:00
Ivan Vučica
ff80e49fb1
Added OPGStateRef tracking and switching at appropriate times. Added OpalGState's -copyWithZone:.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37119 72102866-910b-0410-8b05-ffd578937521
2013-09-19 22:39:11 +00:00
Ivan Vučica
2e395b6e20
Enabled doublebuffering. Fixed some debug code, disabled some other
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37111 72102866-910b-0410-8b05-ffd578937521
2013-09-18 21:49:32 +00:00
Eric Wasylishen
b259982fab
* Source/opal/OpalFontInfo.m: Use new OPFontGetGlyphWithCharacter to
...
properly look up the glyph for a character.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37099 72102866-910b-0410-8b05-ffd578937521
2013-09-17 21:51:02 +00:00
Ivan Vučica
a212d292f6
(completing the previous commit)
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37097 72102866-910b-0410-8b05-ffd578937521
2013-09-17 21:47:09 +00:00
Ivan Vučica
7bc9e1a05a
Fixed erroneous offset of glyphs by taking -defaultLineHeightForFont, multiplying by 0.66, and adding that to pt.y. No idea why 0.66 is the right number.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37095 72102866-910b-0410-8b05-ffd578937521
2013-09-17 21:23:58 +00:00
Ivan Vučica
d9d14649ae
Partially fixed -GSShowGlyphsWithAdvances::: by removing some temporary debugging code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37093 72102866-910b-0410-8b05-ffd578937521
2013-09-17 19:42:01 +00:00
Eric Wasylishen
7b4690c515
* Source/opal/OpalFontInfo.m: Move font space to user space conversion
...
to a separate method. Implement -glyphIsEncoded:, -advancementForGlyph:,
-glyphForCharacter:, -glyphWithName:.
For -boundingRectForGlyph:, and -widthOfString:, return fake, fixed
values.
* Source/opal/OpalContext.m: Fix -isDrawingToScreen implementation;
it now returns YES. This has the unfortunate side effect of breaking
image drawing... but, on the positive side, causes NSLayoutManager
to make calls to GSShowGlyphsWithAdvances in batches of up to
16 glyphs, instead of one at a time...!
* Source/opal/OpalGState.m: Implement -GSSetFont:, and make
-GSShowGlyphsWithAdvances: call CGContextShowGlyphsWithAdvances
Overall state is glyphs are drawn.. they appear upside down,
and the glyph runs only seem to draw at (0, 0).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37087 72102866-910b-0410-8b05-ffd578937521
2013-09-17 06:53:08 +00:00
Ivan Vučica
0027a8bd8b
Fixed scale of metrics by using unitsPerEm and pointSize.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37084 72102866-910b-0410-8b05-ffd578937521
2013-09-16 23:20:14 +00:00
Ivan Vučica
3f417045cc
Opal backend: Progress on implementing fonts based on Opal's Core Graphics and fontconfig/ classes in gnustep-back.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37082 72102866-910b-0410-8b05-ffd578937521
2013-09-16 22:46:45 +00:00
Ivan Vučica
fe626e1e90
Opal: Implemented -defaultLineHeightForFont, the key to getting
...
GNUstep layouting system to use information provided in
-advancementForGlyph:.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37058 72102866-910b-0410-8b05-ffd578937521
2013-09-09 21:27:45 +00:00
Ivan Vučica
33979910bd
opal: Implementation of -graphicsPort that returns a CGContext. Stubs for -DPSsetlinejoin:, -DPSsetlinecap:, -DPSsetmiterlimit:. Implementation of -DPSimage::::::::::: for 32-bit RGB colorspaces
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@36940 72102866-910b-0410-8b05-ffd578937521
2013-08-01 22:28:57 +00:00
Ivan Vučica
2a8c5f64b3
opal: Correct DPSgsave/restore. Disabled doublebuffering. Work on fixing doublebuffering. Implemented various DPS methods.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@36927 72102866-910b-0410-8b05-ffd578937521
2013-07-25 14:49:44 +00:00
Ivan Vučica
82088f34e0
opal: Switched to NSDebugLLog(). Added linking with CoreBase. Implemented CTM management methods. Added DPSsavegstate and DPSrestoregstate.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@36918 72102866-910b-0410-8b05-ffd578937521
2013-07-23 23:18:48 +00:00
Ivan Vučica
a64b9f9058
opal: Various fonts related hacks, as well as further attempts to figure out what's going wrong with painting.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@36910 72102866-910b-0410-8b05-ffd578937521
2013-07-21 11:58:05 +00:00
Ivan Vučica
fbe9ad1032
opal: Implementation of a lot of drawing and matrix methods. Work on getting backing store support to work.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@36893 72102866-910b-0410-8b05-ffd578937521
2013-07-15 15:24:04 +00:00
Ivan Vučica
0a75b89dd3
Drawing a red rectangle with Opal.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@36873 72102866-910b-0410-8b05-ffd578937521
2013-07-11 20:44:32 +00:00
Ivan Vučica
c1cd79d4af
Minimal code for dummy graphics backend now implemented for Opal backend.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@36757 72102866-910b-0410-8b05-ffd578937521
2013-06-25 17:13:37 +00:00
Ivan Vučica
248caad5d0
Added empty 'opal' backend.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@36749 72102866-910b-0410-8b05-ffd578937521
2013-06-23 22:41:31 +00:00