コード例 #1
0
ファイル: Text.cpp プロジェクト: yolanother/Xournal
void Text::readSerialized(ObjectInputStream & in) throw (InputStreamException) {
	XOJ_CHECK_TYPE(Text);

	in.readObject("Text");

	readSerializedElement(in);

	this->text = in.readString();

	font.readSerialized(in);

	in.endObject();
}
コード例 #2
0
ファイル: Image.cpp プロジェクト: wbrenna/xournalpp
void Image::readSerialized(ObjectInputStream & in) throw (InputStreamException) {
	XOJ_CHECK_TYPE(Image);

	in.readObject("Image");

	readSerializedElement(in);

	this->width = in.readDouble();
	this->height = in.readDouble();

	if (this->image) {
		cairo_surface_destroy(this->image);
		this->image = NULL;
	}

	this->image = in.readImage();

	in.endObject();
}
コード例 #3
0
ファイル: TexImage.cpp プロジェクト: wbrenna/xournalpp
void TexImage::readSerialized(ObjectInputStream & in) throw (InputStreamException) {
	XOJ_CHECK_TYPE(TexImage);

	in.readObject("TexImage");

	readSerializedElement(in);

	this->width = in.readDouble();
	this->height = in.readDouble();
	String tmp = in.readString();
	//cast this
	char * tmpcstring = new char[tmp.size()];
	strcpy(tmpcstring,tmp.c_str());
	this->text = tmpcstring;

	if (this->image) {
		cairo_surface_destroy(this->image);
		this->image = NULL;
	}

	this->image = in.readImage();

	in.endObject();
}