+ pixel color test

This commit is contained in:
Julian Hinxlage 2019-11-26 13:24:53 +01:00
parent c7019f1569
commit ceea51437a
1 changed files with 18 additions and 0 deletions

View File

@ -25,6 +25,24 @@ int main() {
code = vkvm::getLastPressedKey();
}
vkvm::setMode(vkvm::GraphicMode::RGB);
vkvm::setPixel(0,0, vkvm::getBackgroundColor());
vkvm::setPixel(5,8, vkvm::getForegroundColor());
vkvm::Color color = vkvm::getPixel(0,0);
vkvm::log(vkvm::INFO,"color = (", (int)color.getRed(), ", ", (int)color.getGreen(), ", ", (int)color.getBlue(), ")");
color = vkvm::getPixel(5,8);
vkvm::log(vkvm::INFO,"color = (", (int)color.getRed(), ", ", (int)color.getGreen(), ", ", (int)color.getBlue(), ")");
vkvm::setMode(vkvm::GraphicMode::TwoColors);
color = vkvm::getPixel(0,0);
vkvm::log(vkvm::INFO,"color = (", (int)color.getRed(), ", ", (int)color.getGreen(), ", ", (int)color.getBlue(), ")");
color = vkvm::getPixel(5,8);
vkvm::log(vkvm::INFO,"color = (", (int)color.getRed(), ", ", (int)color.getGreen(), ", ", (int)color.getBlue(), ")");
std::string input;
while(input != "exit"){
std::cout << "type r for redraw and t for timer (exit to exit)" << std::endl;