Bug 11872 - Implementation of CoreGraphics CGContext DrawShading
Summary: Implementation of CoreGraphics CGContext DrawShading
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 6.2.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-04-20 00:04 UTC by kjpou1
Modified: 2013-04-24 03:22 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Screen shot of Xamarin Studio Assembly Browse of mono touch.dll (565.57 KB, image/tiff)
2013-04-23 00:20 UTC, kjpou1
Details
my screenshot (37.45 KB, image/png)
2013-04-23 09:06 UTC, Sebastien Pouliot
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description kjpou1 2013-04-20 00:04:54 UTC
Implement the DrawShading method on CGContext



public void DrawShading (CGShading shading)
{
	CGContext.CGContextDrawShading (this.handle, shading.handle);
}

Here is the implementation in MonoMac maccore implementation

#if !COREBUILD
		[DllImport (Constants.CoreGraphicsLibrary)]
		extern static void CGContextDrawShading(IntPtr context, IntPtr shading);
		public void DrawShading (CGShading shading)
		{
			CGContextDrawShading (handle, shading.handle);
		}
#endif
Comment 1 Sebastien Pouliot 2013-04-22 08:31:04 UTC
Looks like it's already part of *maccore* CGContext.cs, line #773...

#if !COREBUILD
		[DllImport (Constants.CoreGraphicsLibrary)]
		extern static void CGContextDrawShading(IntPtr context, IntPtr shading);
		public void DrawShading (CGShading shading)
		{
			CGContextDrawShading (handle, shading.handle);
		}
endif

Code in maccore is shared between Xamarin.iOS and MonoMac (and Xamarin.Mac).
Comment 2 Sebastien Pouliot 2013-04-22 08:35:33 UTC
Just verified and it's part of monotouch.dll. 

Maybe code completion was not up-to-date and did not show it ?
Comment 3 kjpou1 2013-04-22 23:51:50 UTC
Hello Sabastien

I thought the same thing about the DrawShading when I added it to maccore and thought it would make it's way into MT.  It did show up in Xamarin.Mac after the last upgrade but can not seem to find it anywhere in MonoTouch which I find weird.

When I open the monotouch in Assembly Browser and go to -> MonoTouch.CoreGraphics -> CGContext 

I have :

DrawImage
DrawLayer 
DrawLayer
DrawLinearGradient
DrawPath
DrawPDFPage
DrawRadialGradient
DrawTiledImage

But the DrawShading does not show up.

I am adding my config information:


=== Xamarin Studio ===

Version 4.0.4 (build 2)
Installation UUID: 943cbbbb-f608-4703-8fd0-8f5aba5bbe2c
Runtime:
	Mono 2.10.12 (mono-2-10/c9b270d)
	GTK 2.24.16
	GTK# (2.12.0.0)
	Package version: 210120000

=== Xamarin.Android ===

Version: 4.6.4 (Business Edition)
Android SDK: /Users/Jimmy/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1 (API level 7)
		2.2 (API level 8)
		2.3 (API level 10)
		3.1 (API level 12)
		4.0 (API level 14)
Java SDK: /usr

=== Apple Developer Tools ===

Xcode 4.6.2 (2067.2)
Build 4H1003

=== Xamarin.iOS ===

Version: 6.2.3.0 (Business Edition)
Hash: 8d98f5e
Branch: 
Build date: 2013-10-04 14:08:06-0400

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Build Information ===

Release ID: 400040002
Git revision: a8bf58d398a13bcc7595f5f85adae04865a834d4
Build date: 2013-04-17 16:35:47+0000
Xamarin addins: f24db65837464cb72995ce5e84fa62fb0069724c

=== Operating System ===

Mac OS X 10.8.3
Darwin Kenneth-Pounceys-iMac.local 12.3.0 Darwin Kernel Version 12.3.0
    Sun Jan  6 22:37:10 PST 2013
    root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64
Comment 4 kjpou1 2013-04-23 00:20:53 UTC
Created attachment 3845 [details]
Screen shot of Xamarin Studio Assembly Browse of mono touch.dll

Sabastien

Here is a screen shot showing the Assembly Browser of monotouch.dll with just the DrawXXX methods at the touch.

Kenneth
Comment 5 Sebastien Pouliot 2013-04-23 09:06:52 UTC
Created attachment 3852 [details]
my screenshot

I have it. The reason is because your patch is recent (96be5f6f Feb 20th) and that was before "big splash" (Xamarin 2.0). 

All minor versions after this came from a branch (bs1) and not "master" so it did not include your fix. The first maaintenance release from master (not the branch) will have it (along with more fixes).
Comment 6 Sebastien Pouliot 2013-04-23 09:08:11 UTC
Note that 6.3.x (beta, based on mono 3.0) already has it (as it tracks maccore/master).
Comment 7 kjpou1 2013-04-24 03:22:55 UTC
Sebastien

Thank you for the information.  Will update and test.

Kenneth