当前位置: 首页>>代码示例>>Java>>正文


Java MutableImage类代码示例

本文整理汇总了Java中org.microemu.device.MutableImage的典型用法代码示例。如果您正苦于以下问题:Java MutableImage类的具体用法?Java MutableImage怎么用?Java MutableImage使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


MutableImage类属于org.microemu.device包,在下文中一共展示了MutableImage类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: SwtDisplayGraphics

import org.microemu.device.MutableImage; //导入依赖的package包/类
public SwtDisplayGraphics(SwtGraphics a_g, MutableImage a_image) 
{
	this.g = a_g;
	this.image = a_image;
	
	Device device = DeviceFactory.getDevice();
	
	this.g.setBackground(g.getColor(new RGB(
			((SwtDeviceDisplay) device.getDeviceDisplay()).getBackgroundColor().getRed(), 
			((SwtDeviceDisplay) device.getDeviceDisplay()).getBackgroundColor().getGreen(), 
			((SwtDeviceDisplay) device.getDeviceDisplay()).getBackgroundColor().getBlue())));
	SwtFont tmpFont = (SwtFont) ((SwtFontManager) device.getFontManager()).getFont(currentFont);
	this.g.setFont(tmpFont.getFont());
	
	if (device.getDeviceDisplay().isColor()) {
		this.filter = new RGBImageFilter();
	} else {
		if (device.getDeviceDisplay().numColors() == 2) {
			this.filter = new BWImageFilter();
		} else {
			this.filter = new GrayImageFilter();
		}
	}
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:25,代码来源:SwtDisplayGraphics.java

示例2: J2SEDisplayGraphics

import org.microemu.device.MutableImage; //导入依赖的package包/类
public J2SEDisplayGraphics(java.awt.Graphics2D a_g, MutableImage a_image)
// Andres Navarro
{
    this.g = a_g;
    this.image = a_image;
    
    this.clip = a_g.getClipBounds();

    Device device = DeviceFactory.getDevice();
    J2SEFontManager fontManager = (J2SEFontManager) device.getFontManager();

    J2SEFont tmpFont = (J2SEFont) fontManager.getFont(currentFont);
    this.g.setFont(tmpFont.getFont());
    if (fontManager.getAntialiasing()) {
        this.g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
    } else {
        this.g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
    }

    J2SEDeviceDisplay display = (J2SEDeviceDisplay) device.getDeviceDisplay();
    if (display.isColor()) {
        if (display.backgroundColor.getRed() != 255 || display.backgroundColor.getGreen() != 255 || display.backgroundColor.getBlue() != 255 ||
                display.foregroundColor.getRed() != 0 || display.foregroundColor.getGreen() != 0 || display.foregroundColor.getBlue() != 0) {
            this.filter = new RGBImageFilter();
        }
    } else {
        if (display.numColors() == 2) {
            this.filter = new BWImageFilter();
        } else {
            this.filter = new GrayImageFilter();
        }
    }
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:34,代码来源:J2SEDisplayGraphics.java

示例3: getDisplayImage

import org.microemu.device.MutableImage; //导入依赖的package包/类
public MutableImage getDisplayImage() {
	return context.getDisplayComponent().getDisplayImage();
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:4,代码来源:SwtDeviceDisplay.java

示例4: getImage

import org.microemu.device.MutableImage; //导入依赖的package包/类
public MutableImage getImage() 
{
	return image;
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:5,代码来源:SwtDisplayGraphics.java

示例5: getDisplayImage

import org.microemu.device.MutableImage; //导入依赖的package包/类
public MutableImage getDisplayImage()
{
	return displayImage;
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:5,代码来源:SwtDisplayComponent.java

示例6: fireDisplayRepaint

import org.microemu.device.MutableImage; //导入依赖的package包/类
private void fireDisplayRepaint(MutableImage image)
{
	if (displayRepaintListener != null) {
		displayRepaintListener.repaintInvoked(image);
	}
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:7,代码来源:SwtDisplayComponent.java

示例7: getImage

import org.microemu.device.MutableImage; //导入依赖的package包/类
public MutableImage getImage() {
    return image;
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:4,代码来源:J2SEDisplayGraphics.java

示例8: actionPerformed

import org.microemu.device.MutableImage; //导入依赖的package包/类
public void actionPerformed(ActionEvent e) {
	if (captureFileChooser == null) {
		ExtensionFileFilter fileFilter = new ExtensionFileFilter("GIF files");
		fileFilter.addExtension("gif");
		captureFileChooser = new JFileChooser();
		captureFileChooser.setFileFilter(fileFilter);
		captureFileChooser.setDialogTitle("Capture to GIF File...");
		captureFileChooser.setCurrentDirectory(new File(Config.getRecentDirectory("recentCaptureDirectory")));
	}

	if (captureFileChooser.showSaveDialog(Main.this) == JFileChooser.APPROVE_OPTION) {
		Config.setRecentDirectory("recentCaptureDirectory", captureFileChooser.getCurrentDirectory()
				.getAbsolutePath());
		String name = captureFileChooser.getSelectedFile().getName();
		if (!name.toLowerCase().endsWith(".gif") && name.indexOf('.') == -1) {
			name = name + ".gif";
		}
		File captureFile = new File(captureFileChooser.getSelectedFile().getParentFile(), name);
		if (!allowOverride(captureFile)) {
			return;
		}

		encoder = new AnimatedGifEncoder();
		encoder.start(captureFile.getAbsolutePath());

		menuStartCapture.setEnabled(false);
		menuStopCapture.setEnabled(true);

		emulatorContext.getDisplayComponent().addDisplayRepaintListener(new DisplayRepaintListener() {
			long start = 0;

			public void repaintInvoked(MutableImage image) {
				synchronized (Main.this) {
					if (encoder != null) {
						if (start == 0) {
							start = System.currentTimeMillis();
						} else {
							long current = System.currentTimeMillis();
							encoder.setDelay((int) (current - start));
							start = current;
						}

						encoder.addFrame((BufferedImage) ((J2SEMutableImage) image).getImage());
					}
				}
			}
		});
	}
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:50,代码来源:Main.java

示例9: getDisplayImage

import org.microemu.device.MutableImage; //导入依赖的package包/类
public MutableImage getDisplayImage() {
	return displayImage;
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:4,代码来源:SwingDisplayComponent.java

示例10: fireDisplayRepaint

import org.microemu.device.MutableImage; //导入依赖的package包/类
private void fireDisplayRepaint(MutableImage image) {
	if (displayRepaintListener != null) {
		displayRepaintListener.repaintInvoked(image);
	}
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:6,代码来源:SwingDisplayComponent.java

示例11: AndroidDisplayGraphics

import org.microemu.device.MutableImage; //导入依赖的package包/类
public AndroidDisplayGraphics(Canvas canvas, MutableImage image) {
	this.canvas = canvas;
	this.canvas.save(Canvas.CLIP_SAVE_FLAG);
	this.clip = canvas.getClipBounds();
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:6,代码来源:AndroidDisplayGraphics.java

示例12: getDisplayImage

import org.microemu.device.MutableImage; //导入依赖的package包/类
public MutableImage getDisplayImage() {
	// TODO Auto-generated method stub
	return null;
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:5,代码来源:AndroidDeviceDisplay.java


注:本文中的org.microemu.device.MutableImage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。