• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Drawing in mCarbonWindow doesn't show
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Drawing in mCarbonWindow doesn't show


  • Subject: Drawing in mCarbonWindow doesn't show
  • From: Rémi Thébault <email@hidden>
  • Date: Fri, 2 Nov 2007 03:55:05 +0100

Hello everybody

I started a new project from template "AudioUnit with Carbon View". Now I'd like to draw some custom shapes in it (I'll begin with rectangles).

I wrote this :

	UInt32 xPanelOffset = 0;
	UInt32 yPanelOffset = 0;

if (mAUView->IsCompositWindow ()) {
xPanelOffset = mAUView->GetXOffset();
yPanelOffset = mAUView->GetYOffset();
}

Rect r = { mPitchBarRect.top + yPanelOffset, mPitchBarRect.left + xPanelOffset,
mPitchBarRect.bottom + yPanelOffset, mPitchBarRect.left+ xPanelOffset };

RGBForeColor(&mPitchBarColor);
PaintRect(&r);



and I tried with Quartz 2D as well : CGContextRef myContext; SetPortWindowPort(mAUView->mCarbonWindow);

QDBeginCGContext (GetWindowPort (mAUView->mCarbonWindow), &myContext);

        	CGContextSetRGBFillColor (myContext, 1, 0, 0, 1);
        	CGContextFillRect (myContext, CGRectMake (0, 0, 200, 100));
        	CGContextSetRGBFillColor (myContext, 0, 0, 1, .5);
        	CGContextFillRect (myContext, CGRectMake (0, 0, 100, 200));

CGContextFlush(myContext);
QDEndCGContext (GetWindowPort(mAUView->mCarbonWindow), &myContext);
}



But the rectangles refuse to show though the controls (static text and others) are showing properly.
Any ideas ?


Rémi Thébault
	  _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • mixing multiple streams and avoiding level loss?
      • From: "Kevin Dixon" <email@hidden>
  • Prev by Date: Re: Filter algorithims
  • Next by Date: mixing multiple streams and avoiding level loss?
  • Previous by thread: Re: Filter algorithims
  • Next by thread: mixing multiple streams and avoiding level loss?
  • Index(es):
    • Date
    • Thread