mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 17:59:34 +00:00
make getRect pass out an nsrect&
This commit is contained in:
parent
3f44553e13
commit
2fc149e1f3
@ -31,6 +31,7 @@
|
||||
%}
|
||||
|
||||
interface gfxIImageFrame;
|
||||
native nsRectRef(nsRect &);
|
||||
|
||||
/**
|
||||
* gfxIImageFrame interface
|
||||
@ -92,8 +93,9 @@ interface gfxIImageFrame : nsISupports
|
||||
|
||||
/**
|
||||
* The rectangle this frame ocupies.
|
||||
* @param rect this is really an out parameter.
|
||||
*/
|
||||
[noscript] readonly attribute nsRect rect;
|
||||
[noscript] void getRect(in nsRectRef rect);
|
||||
|
||||
/**
|
||||
* The image data format the image was created with.
|
||||
|
@ -33,5 +33,4 @@
|
||||
typedef PRInt32 nscoord;
|
||||
|
||||
[ptr] native nsRect(nsRect);
|
||||
[ref] native nsRectRef(nsRect);
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
%}
|
||||
|
||||
interface gfxIImageFrame;
|
||||
native nsRectRef(nsRect &);
|
||||
|
||||
/**
|
||||
* gfxIImageFrame interface
|
||||
@ -92,8 +93,9 @@ interface gfxIImageFrame : nsISupports
|
||||
|
||||
/**
|
||||
* The rectangle this frame ocupies.
|
||||
* @param rect this is really an out parameter.
|
||||
*/
|
||||
[noscript] readonly attribute nsRect rect;
|
||||
[noscript] void getRect(in nsRectRef rect);
|
||||
|
||||
/**
|
||||
* The image data format the image was created with.
|
||||
|
@ -33,5 +33,4 @@
|
||||
typedef PRInt32 nscoord;
|
||||
|
||||
[ptr] native nsRect(nsRect);
|
||||
[ref] native nsRectRef(nsRect);
|
||||
|
||||
|
@ -152,14 +152,14 @@ NS_IMETHODIMP gfxImageFrame::GetHeight(nscoord *aHeight)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute nsRect rect; */
|
||||
NS_IMETHODIMP gfxImageFrame::GetRect(nsRect **aRect)
|
||||
/* void getRect(in nsRectRef rect); */
|
||||
NS_IMETHODIMP gfxImageFrame::GetRect(nsRect &aRect)
|
||||
{
|
||||
if (!mInitalized)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
nsRect rect(mOffset.x, mOffset.y, mSize.width, mSize.height);
|
||||
*aRect = ▭
|
||||
aRect.SetRect(mOffset.x, mOffset.y, mSize.width, mSize.height);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
%}
|
||||
|
||||
interface gfxIImageFrame;
|
||||
native nsRectRef(nsRect &);
|
||||
|
||||
/**
|
||||
* gfxIImageFrame interface
|
||||
@ -92,8 +93,9 @@ interface gfxIImageFrame : nsISupports
|
||||
|
||||
/**
|
||||
* The rectangle this frame ocupies.
|
||||
* @param rect this is really an out parameter.
|
||||
*/
|
||||
[noscript] readonly attribute nsRect rect;
|
||||
[noscript] void getRect(in nsRectRef rect);
|
||||
|
||||
/**
|
||||
* The image data format the image was created with.
|
||||
|
@ -33,5 +33,4 @@
|
||||
typedef PRInt32 nscoord;
|
||||
|
||||
[ptr] native nsRect(nsRect);
|
||||
[ref] native nsRectRef(nsRect);
|
||||
|
||||
|
@ -152,14 +152,14 @@ NS_IMETHODIMP gfxImageFrame::GetHeight(nscoord *aHeight)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute nsRect rect; */
|
||||
NS_IMETHODIMP gfxImageFrame::GetRect(nsRect **aRect)
|
||||
/* void getRect(in nsRectRef rect); */
|
||||
NS_IMETHODIMP gfxImageFrame::GetRect(nsRect &aRect)
|
||||
{
|
||||
if (!mInitalized)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
nsRect rect(mOffset.x, mOffset.y, mSize.width, mSize.height);
|
||||
*aRect = ▭
|
||||
aRect.SetRect(mOffset.x, mOffset.y, mSize.width, mSize.height);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user