Add Java exceptions to catch RS calls with no context or no surface.

This commit is contained in:
Jason Sams
2009-12-07 12:40:12 -08:00
parent 6d42d80653
commit 771bebb940
11 changed files with 71 additions and 0 deletions

View File

@ -46,11 +46,13 @@ public class ProgramRaster extends BaseObj {
}
public void setLineWidth(float w) {
mRS.validate();
mLineWidth = w;
mRS.nProgramRasterSetLineWidth(mID, w);
}
public void setPointSize(float s) {
mRS.validate();
mPointSize = s;
mRS.nProgramRasterSetPointSize(mID, s);
}
@ -98,6 +100,7 @@ public class ProgramRaster extends BaseObj {
}
public ProgramRaster create() {
mRS.validate();
return internalCreate(mRS, this);
}
}