请问org.apache.batik包在那里可以下载到?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了请问org.apache.batik包在那里可以下载到?相关的知识,希望对你有一定的参考价值。
请给个下载链接。
需导入的类为org.apache.batik.svggen.SVGShape
需运行的程序为
SVGShape rect;
if(attrs.getValue("rx")==null)
rect=new SVGShapeRectangle();
else
rect=new SVGShapeRoundRectangle();
((SVGShapeRoundRectangle)rect).setRoundX((int)Double.parseDouble(attrs.getValue("rx")));
((SVGShapeRoundRectangle)rect).setRoundY((int)Double.parseDouble(attrs.getValue("ry")));
rect.addPosition(new Point2D.Double(
Double.parseDouble(attrs.getValue("x")),
Double.parseDouble(attrs.getValue("y"))));
rect.serPosition(new Point2D.Double(
Double.parseDouble(attrs.getValue("width"))+
Double.parseDouble(attrs.getValue("x")),
Double.parseDouble(attrs.getValue("height"))+
Double.parseDouble(attrs.getValue("y"))),2);
rect.setLineWidth(Integer.parseInt(attrs.getValue("stroke-width")));
if(!attrs.getValue("stroke").equals("none"))
rect.drawColor=new Color(
Integer.valueOf(
attrs.getValue("stroke").substring(1),16).intValue());
if(!attrs.getValue("fill").equals("none"))
rect.fillColor=new Color(
Integer.valueOf(
attrs.getValue("fill").substring(1),16).intValue());
rect.setFill(true);
)
rect.selected=false;
Image.addShape(rect);
顺便问一下,还需要导入哪些类和包?
顺便再问一下,SVGShapeRectangle类是在哪个包里的?SVGShape类的导入好像一失败了,不知怎么回事?
我的邮箱:hias_asia@126.com,有jar文件的朋友请发到我的邮箱,谢谢!
大概要引入其中5、6个jar文件。
邮箱:qdmmy6@163.com本回答被提问者采纳
c语言单链表问题,请问这个那里错了,本人菜鸟,下面是程序
#include<stdio.h>
#include<malloc.h>
typedef struct Node
int data;
struct Node *next;
Lnode , *LinkList;
LinkList TCreatList()
Lnode *H,*T,*P; int x;
H=(Lnode *)malloc(sizeof(Lnode));
H->next=NULL; T=H;
scanf("%d",&x);
while( x!=0)
P= (Lnode *)malloc(sizeof(Lnode));
P->data=x; P->next=NULL;
T->next=P; T=P;
scanf("%d",&x);
return H;
void PrintfList(LinkList H)
Lnode *p=H ;
while(p!=NULL)
printf("%d",p->data);
p=p->next;
int LengthList( LinkList H)
Lnode *p=H; int i=0;
while (p->next!=NULL)
i++; p=p->next;
return i;
printf ("链表的长度是%d/n",i);
Lnode *SearchX(LinkList H,int x)
Lnode *p=H->next;
while(p!=NULL && p->data != x)
p=p->next;
return p;
void InsertList(Lnode *H,int a,int x)
printf("请输入要插入的数据:\n");
Lnode *s, *q = H ;
s=(Lnode *)malloc(sizeof(Lnode));
s->data=x; s->next=NULL;
while(q->next!=NULL&&q->next->data!=a)
q=q->next;
s->next=q->next;
q->next=s;
int main()
LinkList H;
H=TCreatList();
PrintfList(H);
LengthList(H);
SearchX(H);
InsertList(H);
return 0;
之前写的一个程序,带测试信息,给你参考:我这里是用的全局节点变量,所有在插入时只传了2个参数,一个target目标(不是位置,换成指定位置更简单),一个数据:
#include <stdio.h>
#include <stdlib.h>
typedef struct LinkNode
int data;
struct LinkNode *next;
link,*plink;
plink head = NULL;
void addfront()
int value;
plink s,p;
printf("please enter the value\n");
scanf("%d",&value);
s = malloc(sizeof(link));
if(s==NULL)
printf("memory error\n");
return;
s->data = value;
if(head == NULL)
head = s;
s->next = NULL;
else
p = head;
head = s;
s->next = p;
void addtail()
int value;
plink s,p;
s = malloc(sizeof(link));
if(s==NULL)
printf("memory error\n");
return;
printf("please enter the value\n");
scanf("%d",&value);
s->data = value;
if(head == NULL)
head = s;
s->next = NULL;
else
p = head;
while(p->next != NULL)
p = p->next;
p->next = s;
s->next = NULL;
void addAll()
int count,i;
printf("please enter the count\n");
scanf("%d",&count);
for(i=0;i<count;i++)
addtail();
void display()
plink p;
p = head;
while(p)
printf("%3d",p->data);
p = p->next;
printf("\n");
plink search(int data)
int i = 0;
plink p;
if(head == NULL)
printf("single link is empty\n");
return NULL;
p = head;
while(p != NULL)
i++;
if(p->data == data)
printf("the number %d is at %d\n",data,i);
return p;
else
p = p->next;
return NULL;
void insert(int target,int insertvalue)
plink p, q, s;
if(head == NULL)
printf("single link is empty\n");
return ;
s = (plink)malloc(sizeof(link));
if(s == NULL)
printf("memory error!\n");
return ;
s->data = insertvalue;
if(head->data == target)
s->next = head;
head = s;
return;
else
p = q = head;
while(p != NULL)
if(p->data == target)
q->next = s;
s->next = p;
printf("insert successful\n");
return ;
else
q = p;
p = p->next;
printf("insert failed!\n");
void delete(int data)
plink p, q;
if(head == NULL)
printf("single link is empty\n");
return ;
if(head->data == data)
p = head->next;
free(head);
head = p;
printf("delete successful\n");
return;
else
p = q = head;
while(p != NULL)
if(p->data == data)
q->next = p->next;
free(p);
printf("delete successful\n");
return ;
else
q = p;
p = p->next;
printf("delete failed!\n");
void deleteAll(int data)
plink p, q;
if(head == NULL)
printf("single link is empty\n");
return ;
p = q = head;
while(p != NULL)
if(head->data == data)
p = head->next;
free(head);
head = p;
else if(p->data == data)
q->next = p->next;
free(p);
p = q->next;
else
q = p;
p = p->next;
int main(void)
int operation;
printf("please enter your operation\n");
do
printf("\t1.add a number at the first\n");
printf("\t2.add a number at the last\n");
printf("\t3.add multi number\n");
printf("\t4.display the singlelink\n");
printf("\t5.search a number\n");
printf("\t6.insert the insertvalue at the target\n");
printf("\t7.delete the value\n");
printf("\t8.delete all of the value\n");
printf("\t9.quit\n");
scanf("%d",&operation);
switch(operation)
case 1:addfront();break;
case 2:addtail();break;
case 3:addAll();break;
case 4:display();break;
case 5:
int value;
printf("enter the search number\n");
scanf("%d",&value);
search(value);break;
case 6:
int target,insertvalue;
printf("enter the target and insertvalue \n");
scanf("%d%d",&target,&insertvalue);
insert(target,insertvalue);
break;
case 7:
int value;
printf("enter the value to delete \n");
scanf("%d",&value);
delete(value);
break;
case 8:
int value;
printf("enter the value to delete all \n");
scanf("%d",&value);
deleteAll(value);
break;
case 9:return;
default:printf("error input\n");
while(1);
参考技术A 写这段程序的人编程习惯不是很好,希望慢慢改进;在使用指针之前,必须初始化,不然会出现段错误。链表扫描输入建议用getchar()函数,可以正确的处理掉回车符。
按照scanf()输入,建立链表我修改为:
LinkList TCreatList()
Lnode *H,*T,*P=NULL; int x;
scanf("%d",&x);
while( 1)
P= (Lnode *)malloc(sizeof(Lnode));
P->data=x;
if(H==NULL)
H=P;
else
T->next=P;
T=P;
else if(x==0)
break;
return H;
还有,仔细检查插入函数,a和x的实际意义是什么,我看不懂;
参考资料:h=p
本回答被提问者和网友采纳以上是关于请问org.apache.batik包在那里可以下载到?的主要内容,如果未能解决你的问题,请参考以下文章
请问动画《美少女战士R2(国语)、S、SS、最后的星光》在那里免费下载