亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? teximage_c.m

?? 在matlab中
?? M
?? 第 1 頁 / 共 2 頁
字號:
  texbin = '';
end
[s,r] = run_system_cmd(['"' fullfile(texbin,['dvips' exe_ext]) ...
                    '" -D ' int2str(res) ' -E -o "' ps_file ...
                    '" "' dvi_file '"']);
if ~exist(ps_file)
  ind1 = findstr('!',r);
  if ~isempty(ind1)
    r = r(ind1:end);
  end
  error(['Error running DVIPS: ' r]);
end

function bits = ghostscript(file,res,exe_ext);
origpsfile = [file '.ps'];
psfile = [file '2.ps'];
%some postscript hacking to translate the equation to 0,0
origps_fid = fopen (origpsfile, 'r');
F=fread(origps_fid); % read the whole thing in
fclose(origps_fid);
F=char(F');
bbox=findstr('BoundingBox',F) + 13; % skip to start of numbers
bboxstr = F(bbox:bbox+50);
bbox = sscanf(bboxstr,'%d',4);      % read in bounding box
endsetup=findstr('EndSetup',F)+8;
while isspace(F(endsetup))
  endsetup = endsetup + 1;
end
F=[F(1:endsetup-1) int2str(-bbox(1)) ...
   ' ' int2str(-bbox(2)) ' translate ' F(endsetup:end)];
ps_fid = fopen (psfile, 'w');
fwrite(ps_fid,F);
fclose(ps_fid);

% now go and rasterize the translated file
pcx_file = [file '.pcx'];
rsp_file = [file '.rsp'];
rsp_fid = fopen (rsp_file, 'w');

ghostDir = fullfile( matlabroot, 'sys', 'ghostscript' );
if ~exist(ghostDir)
  error( ['Can not find the directory for Ghostscript in ' matlabroot] )
end

fprintf(rsp_fid, '-dNOPAUSE -q \n');
v = version;
if v(1) >= '6'
  fprintf(rsp_fid, '-I"%s"\n', fullfile( ghostDir, 'ps_files'));
  fprintf(rsp_fid, '-I"%s"\n', fullfile( ghostDir, 'fonts'));
  fprintf(rsp_fid, '-sOutputFile="%s"\n', pcx_file );
else
  fprintf(rsp_fid, '-I%s\n', fullfile( ghostDir, 'ps_files',' '));
  fprintf(rsp_fid, '-I%s\n', fullfile( ghostDir, 'fonts',' '));
  fprintf(rsp_fid, '-sOutputFile=%s\n', pcx_file );
end
fprintf(rsp_fid, '-sDEVICE=pcxmono\n');
width = ceil(bbox(3)-bbox(1))*res/72;
height = ceil(bbox(4)-bbox(2))*res/72;
fprintf( rsp_fid, ['-g' int2str(width) 'x' int2str(height) '\n'] );
fprintf( rsp_fid, ['-r' int2str(res) '\n'] );
fclose(rsp_fid);

if isunix
  gsPath = fullfile(ghostDir,'bin',getenv('ARCH'));
else
  gsPath = fullfile(ghostDir,'bin','win32');
  if ~exist(gsPath,'dir')
    gsPath = fullfile(ghostDir,'bin','nt');
  end
end  
[s, r] = run_system_cmd( ['echo quit | "' fullfile(gsPath, ['gs' exe_ext])...
                    '" "@' rsp_file '" "' psfile '"']);
if ~exist(pcx_file)
  error(['Error running Ghostscript: ' r]);
end
bits = double(imread(pcx_file,'pcx'));

function im = makeimage(p,color,antialias,csize,angle)
p = rot90(p,angle);
mask = p == 1;
F = repmat(1/(csize*csize),[csize csize]);
if isa(color,'char')
  switch lower(color)
   case 'y'
    color = [1 1 0];
   case 'm'
    color = [1 0 1];
   case 'c'
    color = [0 1 1];
   case 'r'
    color = [1 0 0];
   case 'g'
    color = [0 1 0];
   case 'b'
    color = [0 0 1];
   case 'w'
    color = [1 1 1];
   case 'k'
    color = [0 0 0];
   case 'none'
    color = [1 1 1];
  end
end
if (color(1) ~= color(2)) | (color(2) ~= color(3))
  p1 = p; p1(mask) = color(1);
  p2 = p; p2(mask) = color(2);
  p3 = p; p3(mask) = color(3);
  if isequal(antialias,'on')
    p1 = doblur(p1,F);
    p2 = doblur(p2,F);
    p3 = doblur(p3,F);
  end
  im = cat(3,p1,p2,p3);
else
  p(mask) = color(1);
  if isequal(antialias,'on')
    p = doblur(p,F);
  end
  im = repmat(p,[1 1 3]);
end

function out = doblur(p,F)
out = conv2(p,F,'valid'); % reduces p
out(out>1) = 1;out(out<0) = 0;

function menu = makecontextmenu(h)
menu = uicontextmenu;
item = uimenu('parent',menu,'label','Increase Size','callback',...
	       'teximage(''increasesize'',gcbo)','userdata',h);
item = uimenu('parent',menu,'label','Decrease Size','callback',...
	       'teximage(''decreasesize'',gcbo)','userdata',h);
item = uimenu('parent',menu,'label','Sharpen','callback',...
	       'teximage(''sharpentex'',gcbo)','userdata',h);
item = uimenu('parent',menu,'label','Blur','callback',...
	       'teximage(''blurtex'',gcbo)','userdata',h);
item = uimenu('parent',menu,'label','AntiAlias','callback',...
	       'teximage(''togglealias'',gcbo)','userdata',h);
item = uimenu('parent',menu,'label','Background');
sub = uimenu('parent',item,'label','White','callback',...
	       'teximage(''whitecolor'',gcbo)','userdata',h);
sub = uimenu('parent',item,'label','Figure Color','callback',...
	       'teximage(''figurecolor'',gcbo)','userdata',h);
sub = uimenu('parent',item,'label','Transparent','callback',...
	       'teximage(''transparent'',gcbo)','userdata',h);
item = uimenu('parent',menu,'label','Angle');
sub = uimenu('parent',item,'label','Rotate Counterclockwise','callback',...
	       'teximage(''rotcounterclock'',gcbo)','userdata',h);
sub = uimenu('parent',item,'label','Rotate Clockwise','callback',...
	       'teximage(''rotclockwise'',gcbo)','userdata',h);

function setantialiasmenu(h,antialias)
menu = get(h,'uicontextmenu');
ch = get(menu,'children');
set(ch(3),'checked',antialias);

function startmove(h)
ax=get(h,'parent');
fig=get(ax,'parent');
setappdata(fig,'teximagemotion',h);
setappdata(h,'mousemove',get(fig,'windowbuttonmotionfcn'));
setappdata(h,'mouseup',get(fig,'windowbuttonupfcn'));
fpos = convertUnits(get(fig,'units'),get(fig,'position'),'inches');
cp = convertUnits(get(fig,'units'),[get(fig,'currentpoint') 10 10],...
		  'inches',fpos,'inches');
setappdata(h,'currentpos',cp(1:2));
set(fig,'windowbuttonmotionfcn','teximage(''mousemove'',gcbo)');
set(fig,'windowbuttonupfcn','teximage(''endmove'',gcbo)');

function mousemove(fig)
h = getappdata(fig,'teximagemotion');
ax=get(h,'parent');
apos = get(ax,'position');
oldpos = getappdata(h,'currentpos');
funits = get(fig,'units');
fpos = convertUnits(funits,get(fig,'position'),'inches');
cp = convertUnits(funits,[get(fig,'currentpoint') 10 10],'inches',...
		  fpos,'inches');
newpos = cp(1:2);
diffs = newpos-oldpos;
apos(1:2) = apos(1:2) + diffs;
set(ax,'position',apos);
setappdata(h,'currentpos',newpos);
oldcenter = getappdata(h,'position');
cunits = getappdata(h,'units');
cp = convertUnits(cunits,[oldcenter 10 10],'inches',fpos,'inches');
cp(1:2) = cp(1:2) + diffs;
cp = convertUnits('inches',cp,cunits,fpos,'inches');
setappdata(h,'position',cp(1:2));

function endmove(fig)
h = getappdata(fig,'teximagemotion');
set(fig,'windowbuttonmotionfcn',getappdata(h,'mousemove'));
set(fig,'windowbuttonupfcn',getappdata(h,'mouseup'));

function docallback(s,menuh)
h = get(menuh,'userdata');
fig = get(get(h,'parent'),'parent');
op=get(fig,'pointer');
set(fig,'pointer','watch');
switch (s)
 case 'increasesize'
  teximage(h,'scale',getappdata(h,'scale') * 1.25);
 case 'decreasesize'
  teximage(h,'scale',getappdata(h,'scale') / 1.25);
 case 'sharpentex'
  teximage(h,'convolution',getappdata(h,'convolution') - 2);
 case 'blurtex'
  teximage(h,'convolution',getappdata(h,'convolution') + 2);
 case 'whitecolor'
  teximage(h,'background','w');
 case 'figurecolor'
  teximage(h,'background',get(fig,'color'));
 case 'transparent'
  teximage(h,'background','none');
 case 'togglealias'
  a = getappdata(h,'antialias');
  if isequal(a,'on')
    teximage(h,'antialias','off');
  else
    teximage(h,'antialias','on');
  end
 case 'rotcounterclock'
  teximage(h,'rotation',getappdata(h,'rotation') + 90);
 case 'rotclockwise'
  teximage(h,'rotation',getappdata(h,'rotation') - 90);
end
set(fig,'pointer',op);

function figuremoved(fig);
fpos = convertUnits(get(fig,'units'),get(fig,'position'),'inches');
H = findall(fig,'type','image','tag','teximage');
H=H(:)';
for h=H
  ax = get(h,'parent');
  hunits = getappdata(h,'units');
  if hunits(1) == 'n'
    apos = get(ax,'pos');
    pos = getappdata(h,'position');
    center = convertUnits(hunits,[pos 10 10],'inches',fpos,'inches');
    apos(1:2) = center(1:2) - .5*apos(3:4);
    set(ax,'pos',apos);
  end
end
  
function texbin = locateTeX
texbin = 0;
if isunix
  [s,path] = unix('which tex');
  if s == 0      % tex is on the system path so
    texbin = ''; % we don't need to include an explicit path
  end
else
  % first try looking for MiKTeX
  try
    texbin = winqueryreg('HKEY_LOCAL_MACHINE',...
	'SOFTWARE\MiK\MiKTeX\CurrentVersion\MiKTeX','Install Root');
  catch
    return
  end
  texbin = fullfile(texbin,'miktex','bin');
end

function texbin = promptForTeX(exe_ext)
oldcd = pwd;
cd(matlabroot); % so that the user doesn't start navigating
                % from the TEMP directory.
[file,texbin] = uigetfile(['*' exe_ext],'Locate TeX Executable');
cd(oldcd);

function val = getdefault(ishndl,s,str,default)
if ishndl
  val = getappdata(s,str);
elseif Lispref('teximage',str)
  val = Lgetpref('teximage',str);
else
  val = default;
end

function [s,r] = run_system_cmd(cmd);
if isunix
  [s, r] = unix(cmd);
else
  [s, r] = dos(cmd);
end

function val2 = convertUnits(units1,val1,units2,ref,refunits)
%Persistent figure so that we can get the figure position 
%  in inches instead of its units. This way we don't change 
%  the original figure. Also used to convert any units.
persistent teximage_figure_for_units;
persistent teximage_axes_for_units;
if isempty(teximage_figure_for_units)
  teximage_figure_for_units = figure('visible','off',...
				     'handlevis','off',...
				     'integerhandle','off');
  teximage_axes_for_units=axes('parent',teximage_figure_for_units);
end
set(teximage_figure_for_units,'units','inches');
if nargin == 3
  set(teximage_figure_for_units,'units',get(0,'Units'));
  set(teximage_figure_for_units,'position',get(0,'ScreenSize'));
else
  set(teximage_figure_for_units,'units',refunits);
  set(teximage_figure_for_units,'position',ref);
end
set(teximage_axes_for_units,'units',units1);
set(teximage_axes_for_units,'position',val1);
set(teximage_axes_for_units,'units',units2);
val2 = get(teximage_axes_for_units,'position');

function out = canreusebits(h,resolution,displaymode,s)
res  = getappdata(h,'resolution');
disp = getappdata(h,'displaymode');
str  = getappdata(h,'texstring');
out  = isequal(res,resolution) & isequal(disp,displaymode) & ...
      isequal(str,s);

% preferences API that works on both R11 and R12
function out = Lispref(s1,s2)
oldwarn = warning;
warning('off');
out = logical(0);
try
  out = ispref(s1,s2);
catch
  if isappdata(0,s1)
    h = getappdata(0,s1);
    out = isfield(h,s2);
  end
end
warning(oldwarn);

function out = Lgetpref(s1,s2)
oldwarn = warning;
warning('off');
try
  out = getpref(s1,s2);
catch
  if isappdata(0,s1)
    h = getappdata(0,s1);
    out = getfield(h,s2);
  else
    error(['No preference for ' s2]);
  end
end
warning(oldwarn);

function Lsetpref(s1,s2,val)
oldwarn = warning;
warning('off');
try
  setpref(s1,s2,val);
catch
  setappdata(0,'teximage',struct(s2,val));
  disp('Copy the following line into your startup.m:');
  if isa(val,'char')
    disp(['setappdata(0,''teximage'',struct(''' s2 ''', ''' val '''));']);
  end
end
warning(oldwarn);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品免费视频| 麻豆成人久久精品二区三区小说| 亚洲一二三专区| 精品一区二区三区免费观看| 91免费精品国自产拍在线不卡 | 精品久久人人做人人爰| 国产精品国产精品国产专区不蜜| 奇米色一区二区三区四区| 粉嫩嫩av羞羞动漫久久久| 日韩欧美美女一区二区三区| 亚洲最大成人综合| 成人美女在线观看| 精品国产91久久久久久久妲己| 亚洲国产精品一区二区久久| 99久久精品免费看| 久久久久国产精品厨房| 日韩avvvv在线播放| 色综合久久久久| 国产亚洲欧美日韩俺去了| 日韩va亚洲va欧美va久久| 欧美三区在线观看| 亚洲精品美腿丝袜| 91在线视频网址| 国产精品久久二区二区| 国产一区二区视频在线播放| 亚洲精品免费播放| www..com久久爱| 久久久久久麻豆| 国产伦精一区二区三区| 久久久蜜桃精品| 国产一区二区主播在线| 久久综合色一综合色88| 精品一区二区三区日韩| 久久免费国产精品| 国产精品1区二区.| 国产精品入口麻豆九色| 成人美女在线视频| 亚洲婷婷在线视频| 91精品办公室少妇高潮对白| 一区二区三区自拍| 在线观看免费一区| 日韩激情一二三区| 欧美一区二区久久| 韩国精品久久久| 久久九九影视网| 99久久精品免费精品国产| 亚洲一线二线三线视频| 欧美日韩在线播放三区| 奇米精品一区二区三区在线观看一 | 亚洲成人精品影院| 欧美三级日韩在线| 青青草成人在线观看| 精品久久久久久亚洲综合网| 国产精品中文字幕日韩精品 | 亚洲伦在线观看| 欧美性大战久久| 蜜臀av亚洲一区中文字幕| 国产亚洲精久久久久久| 91老师国产黑色丝袜在线| 国产91精品一区二区麻豆网站| 中文字幕中文字幕在线一区| 欧美色男人天堂| 精油按摩中文字幕久久| 亚洲色图另类专区| 在线电影欧美成精品| 国产精品99久久久久久有的能看 | av动漫一区二区| 亚洲成人精品一区二区| 国产亚洲视频系列| 欧美日韩亚洲综合一区二区三区| 麻豆精品视频在线观看视频| 中文字幕色av一区二区三区| 欧美精品一二三| 丰满亚洲少妇av| 首页国产欧美日韩丝袜| 国产精品理伦片| 欧美一级日韩一级| 色综合一区二区| 精品午夜一区二区三区在线观看| 亚洲男人的天堂在线aⅴ视频| 日韩欧美激情在线| 91激情五月电影| 国产成人免费在线视频| 日韩精品1区2区3区| 亚洲日本电影在线| 久久尤物电影视频在线观看| 欧美浪妇xxxx高跟鞋交| 风间由美一区二区av101 | 亚洲美女电影在线| 久久网站最新地址| 91麻豆精品国产91久久久使用方法| kk眼镜猥琐国模调教系列一区二区| 日韩精品成人一区二区在线| 亚洲自拍另类综合| 成人欧美一区二区三区1314 | 日本一区二区高清| 欧美一级欧美三级在线观看| 91网站视频在线观看| 国产精品一级片在线观看| 日韩avvvv在线播放| 一区二区三区av电影| 久久久另类综合| 日韩免费视频线观看| 欧美日韩精品三区| 日本道免费精品一区二区三区| 99这里只有精品| youjizz久久| 成人aa视频在线观看| 丁香激情综合五月| 成人午夜av影视| 国产激情视频一区二区在线观看 | 成人黄色小视频| 国产精品正在播放| 精品写真视频在线观看 | 精品精品国产高清a毛片牛牛| 欧美巨大另类极品videosbest| 色悠悠久久综合| 一本色道亚洲精品aⅴ| av成人免费在线观看| 色综合中文综合网| 天堂蜜桃91精品| 琪琪一区二区三区| 热久久久久久久| 日韩1区2区日韩1区2区| 麻豆专区一区二区三区四区五区| 蜜臀精品一区二区三区在线观看| 捆绑调教一区二区三区| 精品一二三四区| 岛国精品一区二区| 在线免费观看成人短视频| 欧美天天综合网| 欧美一卡二卡在线观看| 精品久久久久香蕉网| 国产欧美一区二区精品婷婷| 中文字幕二三区不卡| 亚洲人精品午夜| 午夜视频在线观看一区| 麻豆免费精品视频| 成人综合激情网| 91福利在线免费观看| 日韩一区二区精品在线观看| 国产视频911| 亚洲欧洲精品一区二区三区 | 国产资源精品在线观看| 成人av网站在线| 欧美人伦禁忌dvd放荡欲情| 欧美大片在线观看| 中文字幕中文乱码欧美一区二区 | 日韩理论电影院| 五月婷婷激情综合| 国产精品亚洲а∨天堂免在线| 99久久国产免费看| 5566中文字幕一区二区电影| 国产精品萝li| 午夜精品免费在线观看| 国内成人免费视频| 99视频国产精品| 精品电影一区二区| 亚洲综合图片区| 国产 欧美在线| 欧美日韩高清一区二区| 欧美国产一区在线| 日韩激情一区二区| 日本丶国产丶欧美色综合| 久久久国际精品| 五月天丁香久久| 粉嫩高潮美女一区二区三区 | 久久不见久久见免费视频1| 色综合天天视频在线观看 | 久久av中文字幕片| 日本精品免费观看高清观看| 欧美成人性战久久| 亚洲午夜一区二区三区| 福利一区福利二区| 欧美一级二级三级蜜桃| 亚洲伊人色欲综合网| 成人午夜av在线| 久久久精品国产免费观看同学| 午夜国产精品影院在线观看| 成人精品视频网站| 26uuu国产日韩综合| 肉色丝袜一区二区| 色吧成人激情小说| 国产三级一区二区| 精品一二三四在线| 3d动漫精品啪啪一区二区竹菊| 亚洲欧美日韩在线播放| 国产成人av福利| 精品国产电影一区二区| 麻豆视频观看网址久久| 在线不卡欧美精品一区二区三区| 亚洲欧美日韩在线| 91久久精品一区二区三区| 亚洲欧美日韩一区二区三区在线观看| 色婷婷亚洲一区二区三区| 中文字幕欧美一| jizz一区二区| 亚洲三级免费观看| 一本在线高清不卡dvd| 亚洲欧美视频在线观看|