<commit_before>#include "ImageCanvasX11.h"

namespace tk {

std::shared_ptr<ImageCanvas> ImageCanvas::create(tk::WDims dims, bool transparent) {
	auto imageBuffer = tk::image::create(tk::image::Params(tk::image::Type::BGRA,dims).tryTransparent(transparent));
	// preprocessing pixels?
	return std::make_shared<ImageCanvasX11>(imageBuffer);
}

ImageCanvasX11::ImageCanvasX11(tk::image::Ptr imageBuffer):
	imageBuffer(std::move(imageBuffer)),
	canvas(this->imageBuffer->beginDraw())
{
}

tk::Canvas & ImageCanvasX11::imageCanvas() {
	return canvas;
}

tk::image::Ptr ImageCanvasX11::finishAndCreateImage() {
	imageBuffer->endDraw();
	// postprocessing pixels?
	return imageBuffer;
}

}<commit_msg>TODO to implement drawing on transparent canvas in X11<commit_after>#include "ImageCanvasX11.h"

namespace tk {

// TODO implement drawing on a transparent canvas

std::shared_ptr<ImageCanvas> ImageCanvas::create(tk::WDims dims, bool transparent) {
	auto imageBuffer = tk::image::create(tk::image::Params(tk::image::Type::BGRA,dims).tryTransparent(transparent));
	// preprocessing pixels?
	return std::make_shared<ImageCanvasX11>(imageBuffer);
}

ImageCanvasX11::ImageCanvasX11(tk::image::Ptr imageBuffer):
	imageBuffer(std::move(imageBuffer)),
	canvas(this->imageBuffer->beginDraw())
{
}

tk::Canvas & ImageCanvasX11::imageCanvas() {
	return canvas;
}

tk::image::Ptr ImageCanvasX11::finishAndCreateImage() {
	imageBuffer->endDraw();
	// postprocessing pixels?
	return imageBuffer;
}

}
{'fraction_non_alphanumeric': 0.15114709851551958, 'fraction_numerical': 0.017543859649122806, 'mean_word_length': 8.506410256410257, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5000410', 'n_tokens_mistral': 490, 'n_tokens_neox': 477, 'n_words': 77}